Skip to content

Commit

Permalink
[tests] Do not call fixtures directly
Browse files Browse the repository at this point in the history
Otherwise pytest fails with

  Fixture "input_json" called directly. Fixtures are not meant to be called directly,
  but are created automatically when test functions request them as parameters.
  See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
  https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.
  • Loading branch information
michael-k committed Feb 7, 2019
1 parent 03223a7 commit 8579e7c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/test_flip.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,33 +61,33 @@ def multibyte_yaml():


@pytest.fixture
def parsed_json():
return load_json(input_json())
def parsed_json(input_json):
return load_json(input_json)


@pytest.fixture
def parsed_yaml():
return load_yaml(input_yaml())
def parsed_yaml(input_yaml):
return load_yaml(input_yaml)


@pytest.fixture
def parsed_clean_json():
return load_json(clean_json())
def parsed_clean_json(clean_json):
return load_json(clean_json)


@pytest.fixture
def parsed_clean_yaml():
return load_yaml(clean_yaml())
def parsed_clean_yaml(clean_yaml):
return load_yaml(clean_yaml)


@pytest.fixture
def parsed_multibyte_json():
return load_json(multibyte_json())
def parsed_multibyte_json(multibyte_json):
return load_json(multibyte_json)


@pytest.fixture
def parsed_multibyte_yaml():
return load_yaml(multibyte_yaml())
def parsed_multibyte_yaml(multibyte_yaml):
return load_yaml(multibyte_yaml)


@pytest.fixture
Expand Down

0 comments on commit 8579e7c

Please sign in to comment.