diff --git a/src/caoscrawler/identifiable.py b/src/caoscrawler/identifiable.py index 129bb9f36ddb5a44eb0491984bb4a70837449bed..32d07b5e3d948c460a44971f22aa3b65032a6077 100644 --- a/src/caoscrawler/identifiable.py +++ b/src/caoscrawler/identifiable.py @@ -111,7 +111,7 @@ class Identifiable(): 3. equal if attribute representations are equal """ if not isinstance(other, Identifiable): - raiser ValueError("Identifiable can only be compared to other Identifiable objects.") + raise ValueError("Identifiable can only be compared to other Identifiable objects.") elif self.record_id is not None and other.record_id is not None: return self.record_id == other.record_id elif self.path is not None and other.path is not None: diff --git a/src/caoscrawler/identified_cache.py b/src/caoscrawler/identified_cache.py index 9df66e926903d0f975e1f6813a06b21207f75e6a..aa2d82f8e66c738e737c62f3cc68eaf60127e28b 100644 --- a/src/caoscrawler/identified_cache.py +++ b/src/caoscrawler/identified_cache.py @@ -49,7 +49,7 @@ class IdentifiedCache(object): caches). """ - def __init__(self): + def __init__(self): self._cache = {} self._identifiables = [] diff --git a/unittests/test_file_identifiables.py b/unittests/test_file_identifiables.py index caa2572d8da276d5f0c58c700561f53c5d7462b8..f71ea75a36049084591851409d71fd9db291f07f 100644 --- a/unittests/test_file_identifiables.py +++ b/unittests/test_file_identifiables.py @@ -18,7 +18,8 @@ def test_file_identifiable(): identifiable = ident.get_identifiable(file_obj) # the path is copied to the identifiable - assert file_obj != identifiable + with raises(ValueError): + file_obj != identifiable assert file_obj.path == identifiable.path # since the path does not exist in the data in ident, the follwoing functions return None