diff --git a/examples/fixtures/class_fixture_return/conftest.py b/examples/fixtures/class_fixture_return/conftest.py index 3028b4c..da43a33 100644 --- a/examples/fixtures/class_fixture_return/conftest.py +++ b/examples/fixtures/class_fixture_return/conftest.py @@ -18,6 +18,6 @@ @pytest.fixture(scope='class') -def mocked_config(): +def class_fixture_return_config(): print('setup') return mock.Mock() diff --git a/examples/fixtures/class_fixture_return/test_fixture_session_setup.py b/examples/fixtures/class_fixture_return/test_fixture_session_setup.py index a2eecb7..78881af 100644 --- a/examples/fixtures/class_fixture_return/test_fixture_session_setup.py +++ b/examples/fixtures/class_fixture_return/test_fixture_session_setup.py @@ -25,16 +25,16 @@ # limitations under the License. class TestClassOne: - def test_fixture_class_setup_first(self, mocked_config): - assert mocked_config is not None + def test_fixture_class_setup_first(self, class_fixture_return_config): + assert class_fixture_return_config is not None - def test_fixture_class_setup_second(self, mocked_config): - assert mocked_config is not None + def test_fixture_class_setup_second(self, class_fixture_return_config): + assert class_fixture_return_config is not None class TestClassTwo: - def test_fixture_class_setup_forth(self, mocked_config): - assert mocked_config is not None + def test_fixture_class_setup_forth(self, class_fixture_return_config): + assert class_fixture_return_config is not None - def test_fixture_class_setup_fifth(self, mocked_config): - assert mocked_config is not None + def test_fixture_class_setup_fifth(self, class_fixture_return_config): + assert class_fixture_return_config is not None diff --git a/examples/fixtures/module_fixture_return/conftest.py b/examples/fixtures/module_fixture_return/conftest.py index 48d49da..3336e6a 100644 --- a/examples/fixtures/module_fixture_return/conftest.py +++ b/examples/fixtures/module_fixture_return/conftest.py @@ -18,6 +18,6 @@ @pytest.fixture(scope='module') -def mocked_config(): +def module_fixture_return_config(): print('setup') return mock.Mock() diff --git a/examples/fixtures/module_fixture_return/test_fixture_module_setup.py b/examples/fixtures/module_fixture_return/test_fixture_module_setup.py index 3792099..b11fe6d 100644 --- a/examples/fixtures/module_fixture_return/test_fixture_module_setup.py +++ b/examples/fixtures/module_fixture_return/test_fixture_module_setup.py @@ -24,9 +24,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -def test_fixture_module_setup_first(mocked_config): - assert mocked_config is not None +def test_fixture_module_setup_first(module_fixture_return_config): + assert module_fixture_return_config is not None -def test_fixture_module_setup_second(mocked_config): - assert mocked_config is not None +def test_fixture_module_setup_second(module_fixture_return_config): + assert module_fixture_return_config is not None diff --git a/examples/fixtures/package_fixture_return/conftest.py b/examples/fixtures/package_fixture_return/conftest.py index 1ae95a2..f406944 100644 --- a/examples/fixtures/package_fixture_return/conftest.py +++ b/examples/fixtures/package_fixture_return/conftest.py @@ -18,6 +18,6 @@ @pytest.fixture(scope='package') -def mocked_config(): +def package_fixture_return_config(): print('setup') return mock.Mock() diff --git a/examples/fixtures/package_fixture_return/test_fixture_package_setup_first.py b/examples/fixtures/package_fixture_return/test_fixture_package_setup_first.py index 955dad3..4c42833 100644 --- a/examples/fixtures/package_fixture_return/test_fixture_package_setup_first.py +++ b/examples/fixtures/package_fixture_return/test_fixture_package_setup_first.py @@ -24,5 +24,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -def test_fixture_package_setup_first(mocked_config): - assert mocked_config is not None +def test_fixture_package_setup_first(package_fixture_return_config): + assert package_fixture_return_config is not None diff --git a/examples/fixtures/package_fixture_return/test_fixture_package_setup_second.py b/examples/fixtures/package_fixture_return/test_fixture_package_setup_second.py index 138f4b9..7ba2f2a 100644 --- a/examples/fixtures/package_fixture_return/test_fixture_package_setup_second.py +++ b/examples/fixtures/package_fixture_return/test_fixture_package_setup_second.py @@ -24,5 +24,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -def test_fixture_package_setup_second(mocked_config): - assert mocked_config is not None +def test_fixture_package_setup_second(package_fixture_return_config): + assert package_fixture_return_config is not None diff --git a/examples/fixtures/session_fixture_return/conftest.py b/examples/fixtures/session_fixture_return/conftest.py index 0e4dc5c..9ab2017 100644 --- a/examples/fixtures/session_fixture_return/conftest.py +++ b/examples/fixtures/session_fixture_return/conftest.py @@ -18,6 +18,6 @@ @pytest.fixture(scope='session') -def mocked_config(): +def session_fixture_return_config(): print('setup') return mock.Mock() diff --git a/examples/fixtures/session_fixture_return/test_fixture_session_setup_first.py b/examples/fixtures/session_fixture_return/test_fixture_session_setup_first.py index 83d4f1e..3480e94 100644 --- a/examples/fixtures/session_fixture_return/test_fixture_session_setup_first.py +++ b/examples/fixtures/session_fixture_return/test_fixture_session_setup_first.py @@ -25,5 +25,5 @@ # limitations under the License. -def test_fixture_session_setup_first(mocked_config): - assert mocked_config is not None +def test_fixture_session_setup_first(session_fixture_return_config): + assert session_fixture_return_config is not None diff --git a/examples/fixtures/session_fixture_return/test_fixture_session_setup_second.py b/examples/fixtures/session_fixture_return/test_fixture_session_setup_second.py index 2bd544d..9640d58 100644 --- a/examples/fixtures/session_fixture_return/test_fixture_session_setup_second.py +++ b/examples/fixtures/session_fixture_return/test_fixture_session_setup_second.py @@ -25,5 +25,5 @@ # limitations under the License. -def test_fixture_session_setup_second(mocked_config): - assert mocked_config is not None +def test_fixture_session_setup_second(session_fixture_return_config): + assert session_fixture_return_config is not None diff --git a/examples/fixtures/test_fixture_return_none/conftest.py b/examples/fixtures/test_fixture_return_none/conftest.py index 8496549..e19435a 100644 --- a/examples/fixtures/test_fixture_return_none/conftest.py +++ b/examples/fixtures/test_fixture_return_none/conftest.py @@ -25,5 +25,5 @@ @pytest.fixture -def mocked_config(): - LOGGER.warn(LOG_MESSAGE_SETUP) +def test_fixture_setup_config_none(): + LOGGER.warning(LOG_MESSAGE_SETUP) diff --git a/examples/fixtures/test_fixture_return_none/test_fixture_return_none.py b/examples/fixtures/test_fixture_return_none/test_fixture_return_none.py index 0427072..1d4fb05 100644 --- a/examples/fixtures/test_fixture_return_none/test_fixture_return_none.py +++ b/examples/fixtures/test_fixture_return_none/test_fixture_return_none.py @@ -25,5 +25,5 @@ # limitations under the License. -def test_fixture_setup(mocked_config): - assert mocked_config is not None +def test_fixture_setup_none(test_fixture_setup_config_none): + assert test_fixture_setup_config_none is not None diff --git a/examples/fixtures/test_fixture_setup_failure/conftest.py b/examples/fixtures/test_fixture_setup_failure/conftest.py index 6a41e7f..014f37d 100644 --- a/examples/fixtures/test_fixture_setup_failure/conftest.py +++ b/examples/fixtures/test_fixture_setup_failure/conftest.py @@ -25,6 +25,6 @@ @pytest.fixture -def mocked_config(): +def fixture_setup_failure_config(): logging.error(LOG_MESSAGE_SETUP) raise Exception('Fixture setup failed') diff --git a/examples/fixtures/test_fixture_setup_failure/test_fixture_setup_failure.py b/examples/fixtures/test_fixture_setup_failure/test_fixture_setup_failure.py index 0427072..47282c9 100644 --- a/examples/fixtures/test_fixture_setup_failure/test_fixture_setup_failure.py +++ b/examples/fixtures/test_fixture_setup_failure/test_fixture_setup_failure.py @@ -25,5 +25,5 @@ # limitations under the License. -def test_fixture_setup(mocked_config): - assert mocked_config is not None +def test_fixture_setup_failure(fixture_setup_failure_config): + assert fixture_setup_failure_config is not None diff --git a/examples/fixtures/test_fixture_teardown_failure/conftest.py b/examples/fixtures/test_fixture_teardown_failure/conftest.py index d72b494..a38dc7d 100644 --- a/examples/fixtures/test_fixture_teardown_failure/conftest.py +++ b/examples/fixtures/test_fixture_teardown_failure/conftest.py @@ -27,7 +27,7 @@ @pytest.fixture -def fixture_teardown_config(): +def fixture_teardown_failure_config(): logging.error(LOG_MESSAGE_BEFORE_YIELD) yield mock.Mock() logging.error(LOG_MESSAGE_TEARDOWN) diff --git a/examples/fixtures/test_fixture_teardown_failure/test_fixture_teardown_failure.py b/examples/fixtures/test_fixture_teardown_failure/test_fixture_teardown_failure.py index 47adc57..132aac7 100644 --- a/examples/fixtures/test_fixture_teardown_failure/test_fixture_teardown_failure.py +++ b/examples/fixtures/test_fixture_teardown_failure/test_fixture_teardown_failure.py @@ -27,6 +27,6 @@ from time import sleep -def test_fixture_teardown(fixture_teardown_config): +def test_fixture_teardown_failure(fixture_teardown_failure_config): sleep(0.001) - assert fixture_teardown_config is not None + assert fixture_teardown_failure_config is not None