Пример #1
0
 def test_includes_path(self, tmpdir):
     path = str(tmpdir)
     make_test_tree(path)
     result = functions.path_tree(path)
     assert result["path"] == path
Пример #2
0
 def test_skip_files(self, tmpdir):
     path = str(tmpdir)
     make_test_tree(path)
     result = functions.path_tree(path, skip_files=['file1.txt'])
     assert "file1.txt" not in result["files"]
Пример #3
0
 def test_includes_dirs(self, tmpdir):
     path = str(tmpdir)
     make_test_tree(path)
     result = functions.path_tree(path)
     assert "dirs" in result
     assert os.path.join(path, "dir1") in result["dirs"]
Пример #4
0
 def test_skip_dirs(self, tmpdir):
     path = str(tmpdir)
     make_test_tree(path)
     result = functions.path_tree(path, skip_dirs=['dir1'])
     assert "dir1" not in result["dirs"]
Пример #5
0
 def test_includes_files(self, tmpdir):
     path = str(tmpdir)
     make_test_tree(path)
     result = functions.path_tree(path)
     assert "files" in result
     assert os.path.join(path, "file1.txt") in result["files"]