blob: f77111aa229e20bf59ec6c278bbd92e3df76fdda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
diff --git a/tests.py b/tests.py
index 249caac..0943f39 100644
--- a/tests.py
+++ b/tests.py
@@ -99,8 +99,8 @@ def test_invalid_file_loading(self):
"""Test initializing a database with a corrupt file."""
with open(self.test_file, 'w') as f:
f.write("corrupt data")
- db = PickleDB(self.test_file)
- self.assertEqual(db.all(), [])
+ with self.assertRaises(RuntimeError):
+ PickleDB(self.test_file)
def test_set_non_string_key(self):
"""Test setting a non-string key."""
|