def test_get_paths_after_collect(self): with temporary_dir() as tmpdir: artifact_root = os.path.join(tmpdir, 'artifacts') cache_root = os.path.join(tmpdir, 'cache') safe_mkdir(cache_root) file_path = self.touch_file_in(artifact_root) artifact = TarballArtifact(artifact_root, os.path.join(cache_root, 'some.tar')) artifact.collect([file_path]) self.assertEqual([file_path], list(artifact.get_paths()))
def test_get_paths_after_collect(self): with temporary_dir() as tmpdir: artifact_root = os.path.join(tmpdir, 'artifacts') cache_root = os.path.join(tmpdir, 'cache') safe_mkdir(cache_root) file_path = self.touch_file_in(artifact_root) artifact = TarballArtifact(artifact_root, os.path.join(cache_root, 'some.tar')) artifact.collect([file_path]) self.assertEquals([file_path], list(artifact.get_paths()))