Skip to content

Commit

Permalink
closes #179 by using stricter identity checks in tests rather than ch…
Browse files Browse the repository at this point in the history
…ecks based on unclear equality semantics.
  • Loading branch information
xrotwang committed Sep 9, 2024
1 parent be695c6 commit f8cd20a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down

0 comments on commit f8cd20a

Please sign in to comment.