Ver Fonte

Groovy context manager

bmcorser há 9 anos atrás
pai
commit
684eaa9a6d
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      dulwich/tests/test_repository.py

+ 2 - 1
dulwich/tests/test_repository.py

@@ -777,4 +777,5 @@ class BuildRepoRootTests(TestCase):
         self.assertEqual(r.head(), self._repo.head())
 
     def test_discover_notrepo(self):
-        self.assertRaises(NotGitRepository, Repo.discover('/'))
+        with self.assertRaises(NotGitRepository):
+            Repo.discover('/')