def test_should_allow_to_unset_stateful(self, env_mock): env_mock[EnvironmentVariables.STATEFUL] = 'true' opt = parse_args([ 'tag', '--input', INPUT_PATH_1, '--model-path', INPUT_PATH_2, '--no-stateful' ]) assert opt.stateful is False
def test_should_allow_multiple_input_files_via_multiple_input_params( self): opt = parse_args([ 'header', 'train', '--input', INPUT_PATH_1, '--input', INPUT_PATH_2 ]) assert opt.input == [INPUT_PATH_1, INPUT_PATH_2]
def test_should_allow_multiple_input_files_via_single_input_param( self): opt = parse_args([ 'header', 'train', '--input', '/path/to/dataset1', '/path/to/dataset2' ]) assert opt.input == ['/path/to/dataset1', '/path/to/dataset2']
def test_should_fallback_to_none_statefulness(self, env_mock): env_mock[EnvironmentVariables.STATEFUL] = '' opt = parse_args( ['tag', '--input', INPUT_PATH_1, '--model-path', INPUT_PATH_2]) assert opt.stateful is None
def test_should_use_stateful_env_variable_false_by_default( self, env_mock): env_mock[EnvironmentVariables.STATEFUL] = 'false' opt = parse_args( ['tag', '--input', INPUT_PATH_1, '--model-path', INPUT_PATH_2]) assert opt.stateful is False
def test_should_require_arguments(self): with pytest.raises(SystemExit): parse_args([])