# imported a module. Necessary for testing fixtures.
# See: https://pytest-cov.readthedocs.io/en/latest/plugins.html
addopts = --cov --cov-append
+markers =
+ unittest
+ integrationtest
# See: https://pytest-cov.readthedocs.io/en/latest/plugins.html
+import pytest
+
# Allow use of the testdir fixture
pytest_plugins = ("pytester",)
# pgwui_component_entry_point()
# pgwui_check_settings_entry_point()
+@pytest.mark.unittest
def test_pgwui_testing_fixtures(testdir):
'''Test the fixtures supplied by the pytest_plugin module
'''
# See: https://pytest-cov.readthedocs.io/en/latest/plugins.html
+import pytest
+
from pgwui_testing import pytest_plugin_helpers
# pgwui_entry_point()
+@pytest.mark.unittest
def test_pgwui_entry_point_there(monkeypatch):
'''True when the component is a pgwui.components entry point
'''
is True)
+@pytest.mark.unittest
def test_pgwui_entry_point_not_there(monkeypatch):
'''False when the component is not pgwui.components entry point
'''
# See: https://pytest-cov.readthedocs.io/en/latest/plugins.html
+import pytest
+
import sys
from pgwui_testing import testing
sys.modules[__name__], 'func_to_mock')
+@pytest.mark.integrationtest
def test_make_mock_fixture_fixture(mocked_func):
# The mock of the function works
mocked_method = testing.instance_method_mock_fixture('method_to_mock')
+@pytest.mark.integrationtest
def test_instance_method_mock_fixture(mocked_method):
# The mock of the instance method works