def test_sorted_inode_first_path(testing_workdir): path_one = os.path.join(testing_workdir, "one") path_two = os.path.join(testing_workdir, "two") path_one_hardlink = os.path.join(testing_workdir, "one_hl") open(path_one, "a").close() open(path_two, "a").close() os.link(path_one, path_one_hardlink) files = ["one", "two", "one_hl"] assert build.get_inode_paths(files, "one", testing_workdir) == ["one", "one_hl"] assert build.get_inode_paths(files, "one_hl", testing_workdir) == ["one", "one_hl"] assert build.get_inode_paths(files, "two", testing_workdir) == ["two"]