def test_blows_up_on_unhashable_args(self): with self.assertRaises(ValueError): SnapshottedProcessRequest(args=['1']) with self.assertRaises(ValueError): SnapshottedProcessRequest(args=('1',), snapshots=[]) with self.assertRaises(ValueError): SnapshottedProcessRequest(args=('1',), directories_to_create=[])
def java_sources_to_javac_args(sources_snapshot, out_dir): return SnapshottedProcessRequest(args=('-d', out_dir.path)+ tuple(f.path for f in sources_snapshot.files), snapshots=(sources_snapshot,), directories_to_create=(out_dir.path,))
def empty_process_request(): return SnapshottedProcessRequest(args=tuple())
def file_list_to_args_for_cat_with_snapshot_subjects_and_output_file(snapshot): return SnapshottedProcessRequest(args=tuple(sorted(f.path for f in snapshot.files)), snapshots=(snapshot,))
def java_sources_to_javac_args(java_sources, out_dir): return SnapshottedProcessRequest(args=('-d', out_dir.path)+ tuple(f.path for f in java_sources.dependencies), snapshot_subjects=(java_sources,), directories_to_create=(out_dir.path,))
def file_list_to_args_for_cat_with_snapshot_subjects_and_output_file(files): return SnapshottedProcessRequest(args=tuple(sorted(f.path for f in files.dependencies)), snapshot_subjects=(files,))
def file_list_to_args_for_cat(files): return SnapshottedProcessRequest(args=tuple(f.path for f in files.dependencies))