import pytest import pathlib from test_helper import cleanup from media import Media @pytest.fixture def create_test_files(cleanup): pathlib.Path('./tests/target/').mkdir(parents=True, exist_ok=False) pathlib.Path('./tests/file').mkdir(parents=True, exist_ok=True) for x in range(1,6): p = Media('./tests/file/file' + str(x) + '.txt') t = Media('./tests/target/target' + str(x) + '.txt') t.path.touch(exist_ok=False) p.symlink_to(t.path) def test_symlink_to_hdlink(create_test_files): for p in pathlib.Path('./tests/file/').iterdir(): Media(p).convert_symlink_to_hdlink() assert True # TODO: Modify test case to computationaly test inode of file