Răsfoiți Sursa

Fix python3 compatibility.

Jelmer Vernooij 8 ani în urmă
părinte
comite
38aca2675f
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      dulwich/tests/test_porcelain.py

+ 2 - 2
dulwich/tests/test_porcelain.py

@@ -230,14 +230,14 @@ class AddTests(PorcelainTestCase):
         with open(os.path.join(self.repo.path, 'foo'), 'w') as f:
         with open(os.path.join(self.repo.path, 'foo'), 'w') as f:
             f.write("BAR")
             f.write("BAR")
         porcelain.add(self.repo.path, paths=["foo"])
         porcelain.add(self.repo.path, paths=["foo"])
-        self.assertIn("foo", self.repo.open_index())
+        self.assertIn(b"foo", self.repo.open_index())
 
 
     def test_add_file_absolute_path(self):
     def test_add_file_absolute_path(self):
         # Absolute paths are (not yet) supported
         # Absolute paths are (not yet) supported
         with open(os.path.join(self.repo.path, 'foo'), 'w') as f:
         with open(os.path.join(self.repo.path, 'foo'), 'w') as f:
             f.write("BAR")
             f.write("BAR")
         porcelain.add(self.repo, paths=[os.path.join(self.repo.path, "foo")])
         porcelain.add(self.repo, paths=[os.path.join(self.repo.path, "foo")])
-        self.assertIn("foo", self.repo.open_index())
+        self.assertIn(b"foo", self.repo.open_index())
 
 
 
 
 class RemoveTests(PorcelainTestCase):
 class RemoveTests(PorcelainTestCase):