Explorar o código

Fix tests: object_index() raises an exception now.

Jelmer Vernooij %!s(int64=16) %!d(string=hai) anos
pai
achega
daf8a449df
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      dulwich/tests/test_pack.py

+ 1 - 1
dulwich/tests/test_pack.py

@@ -66,7 +66,7 @@ class PackIndexTests(PackTests):
     def test_object_index(self):
         """Tests that the correct object offset is returned from the index."""
         p = self.get_pack_index(pack1_sha)
-        self.assertEqual(p.object_index(pack1_sha), None)
+        self.assertRaises(KeyError, p.object_index, pack1_sha)
         self.assertEqual(p.object_index(a_sha), 178)
         self.assertEqual(p.object_index(tree_sha), 138)
         self.assertEqual(p.object_index(commit_sha), 12)