def test_with_rebased_files_returns_same_args_when_there_are_no_files( self): args = ToolArguments() rebased_args = args.with_rebased_files( Directory(os.path.join(ROOT_DIR, 'inputs')), Directory(os.path.join(ROOT_DIR, 'outputs'))) self.assertEqual(args, rebased_args)
def test_with_rebased_files_returns_correct_args_when_there_are_files( self): args = ToolArguments(input_files=(StandaloneFile('file.exe'), )) rebased_args = args.with_rebased_files( Directory(os.path.join(ROOT_DIR, 'inputs')), Directory(os.path.join(ROOT_DIR, 'outputs'))) self.assertEqual(len(rebased_args.input_files), 1) self.assertEqual(rebased_args.input_files[0].path, os.path.join(ROOT_DIR, 'inputs', 'file.exe'))