use isinstance for type checks

This commit is contained in:
Matthias
2023-12-21 19:26:52 +01:00
parent d26154f994
commit 881247a823
2 changed files with 10 additions and 10 deletions

View File

@@ -513,11 +513,11 @@ def test_gethandlerclass():
def test_get_datahandler(testdatadir):
dh = get_datahandler(testdatadir, 'json')
assert type(dh) == JsonDataHandler
assert isinstance(dh, JsonDataHandler)
dh = get_datahandler(testdatadir, 'jsongz')
assert type(dh) == JsonGzDataHandler
assert isinstance(dh, JsonGzDataHandler)
dh1 = get_datahandler(testdatadir, 'jsongz', dh)
assert id(dh1) == id(dh)
dh = get_datahandler(testdatadir, 'hdf5')
assert type(dh) == HDF5DataHandler
assert isinstance(dh, HDF5DataHandler)