def test_file_copying(self): with Context() as finalizers: source_directory = finalizers.mkdtemp() target_directory = finalizers.mkdtemp() touch(os.path.join(source_directory, '42')) copy_package_files(source_directory, target_directory, hard_links=True) self.assertEqual(os.stat(os.path.join(source_directory, '42')).st_ino, os.stat(os.path.join(target_directory, '42')).st_ino)
def test_file_copying(self): """Test that file copying using hard links actually works.""" with Context() as finalizers: source_directory = finalizers.mkdtemp() target_directory = finalizers.mkdtemp() touch(os.path.join(source_directory, '42')) copy_package_files(source_directory, target_directory, hard_links=True) assert os.stat(os.path.join(source_directory, '42')).st_ino == \ os.stat(os.path.join(target_directory, '42')).st_ino
def test_file_copying(self): with Context() as finalizers: source_directory = finalizers.mkdtemp() target_directory = finalizers.mkdtemp() touch(os.path.join(source_directory, '42')) copy_package_files(source_directory, target_directory, hard_links=True) self.assertEqual( os.stat(os.path.join(source_directory, '42')).st_ino, os.stat(os.path.join(target_directory, '42')).st_ino)