Example #1
0
 def test_outside_git_project(self):
     with protect_cwd(self.tmpdir):
         with self.assertRaises(RuntimeError):
             get_git_work_tree()
Example #2
0
 def test_within_git_project(self):
     with protect_cwd(self.tmpdir):
         subprocess.check_output(("git", "init"))
         self.assertEqual(self.tmpdir, get_git_work_tree())