Exemplo n.º 1
0
    def test_samefile_copy(self, tmp_path):
        plugin = PlainPlugin(str(tmp_path / 'data'))

        open(tmp_path / 'file', 'w').close()
        open(tmp_path / 'file2', 'w').close()

        assert not plugin.samefile(tmp_path / 'file', tmp_path / 'file2')
Exemplo n.º 2
0
    def test_samefile_link(self, tmp_path):
        plugin = PlainPlugin(str(tmp_path / 'data'))

        open(tmp_path / 'file', 'w').close()
        os.symlink(tmp_path / 'file', tmp_path / 'file2')

        assert plugin.samefile(tmp_path / 'file', tmp_path / 'file2')