From f8cd20afdfcf1f5f7e55eb01e3b593b1b23ac9b2 Mon Sep 17 00:00:00 2001 From: Robert Forkel Date: Mon, 9 Sep 2024 15:07:56 +0200 Subject: [PATCH] closes #179 by using stricter identity checks in tests rather than checks based on unclear equality semantics. --- tests/test_dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_dataset.py b/tests/test_dataset.py index bae7801..7fe2b7c 100644 --- a/tests/test_dataset.py +++ b/tests/test_dataset.py @@ -123,7 +123,7 @@ def test_column_access(ds): assert 'ValueTable' in ds assert t in ds assert not Table.fromvalue({'url': 'abc.csv'}) in ds - assert ds['ValueTable'] == ds['datapoints.csv'] + assert ds['ValueTable'] is ds['datapoints.csv'] assert ('ValueTable', 'colx') not in ds with pytest.raises(KeyError): @@ -134,7 +134,7 @@ def test_column_access(ds): assert "xyz" in str(e) and "datapoints.csv" in str(e) t = ds['ValueTable'] assert all((t, c) in ds for c in t.tableSchema.columns) - assert ds['ValueTable', 'Language_ID'] == ds['datapoints.csv', 'languageReference'] + assert ds['ValueTable', 'Language_ID'] is ds['datapoints.csv', 'languageReference'] del ds['ValueTable', 'Language_ID'] assert ('ValueTable', 'Language_ID') not in ds