def scenario_invalid_settings_error_is_raised(self, test_settings,
                                               ref_exc_substr):
     with self.assertRaises(InvalidTestSettingsError) as cm:
         FileinfoArguments.from_test_settings(test_settings)
     self.assertIn(ref_exc_substr, str(cm.exception))
 def test_from_test_settings_config_file_is_present_when_set(self):
     test_settings = FileinfoTestSettings(input='test.exe')
     args = FileinfoArguments.from_test_settings(test_settings)
     self.assertEqual(args.config_file.name, 'test.exe.json')
 def test_from_test_settings_args_is_present_when_set(self):
     test_settings = FileinfoTestSettings(input='test.exe',
                                          args='--arg1 --arg2')
     args = FileinfoArguments.from_test_settings(test_settings)
     self.assertEqual(args.args, test_settings.args)
 def test_from_test_settings_input_files_are_present_when_set(self):
     test_settings = FileinfoTestSettings(input='test.exe')
     args = FileinfoArguments.from_test_settings(test_settings)
     self.assertEqual(len(args.input_files), 1)
     self.assertEqual(args.input_files[0].name, test_settings.input)