diff --git a/tests/func/test_cache.py b/tests/func/test_cache.py index 147840ee41..e4f984221b 100644 --- a/tests/func/test_cache.py +++ b/tests/func/test_cache.py @@ -204,3 +204,18 @@ def test_shared_cache(tmp_dir, dvc, protected, dir_mode, file_mode): for fname in fnames: path = os.path.join(root, fname) assert stat.S_IMODE(os.stat(path).st_mode) == file_mode + + +def test_file_by_inode(tmp_dir, dvc): + (tmp_dir / "data").mkdir() + (tmp_dir / "data" / "DATA").write_text("asdfsdf") + + DATA = os.path.join("data", "DATA") + data = os.path.join("data", "data") + + # assert dvc.cache.local.exists(PathInfo(DATA)) + # assert not dvc.cache.local.exists(PathInfo(data)) + + from dvc.system import System + + assert System.inode(DATA) == System.inode(data)