def test_subsubdir_absolute(self): dirs = action_tracer.all_parent_dirs("/boss/parent/child") self.assertEqual(dirs, {"/boss", "/boss/parent"})
def test_one_path_absolute(self): dirs = action_tracer.all_parent_dirs("/foo") self.assertEqual(dirs, set())
def test_subsubdir(self): dirs = action_tracer.all_parent_dirs("matron/parent/child") self.assertEqual(dirs, {"matron", "matron/parent"})
def test_empty_path_slash(self): dirs = action_tracer.all_parent_dirs("/") self.assertEqual(dirs, set())