Mark unit and integration tests
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 24 Nov 2020 18:24:35 +0000 (12:24 -0600)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 24 Nov 2020 18:24:35 +0000 (12:24 -0600)
setup.cfg
tests/test_pytest_plugin.py
tests/test_pytest_plugin_helpers.py
tests/test_testing.py

index f290ea58df198f9afc4f85c1cc334662690c6c60..6293faa2912f293a9331a5ab8ee7a0c88ded8c1c 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -8,3 +8,6 @@ universal=1
 # imported a module.  Necessary for testing fixtures.
 # See: https://pytest-cov.readthedocs.io/en/latest/plugins.html
 addopts = --cov --cov-append
+markers =
+  unittest
+  integrationtest
index 6f032153a1f2520269347884b5b2b1d2ebf7e6b1..7557e6f9eaf5e7c1029dc98fa2b664f978f15af6 100644 (file)
@@ -22,6 +22,8 @@
 
 # See: https://pytest-cov.readthedocs.io/en/latest/plugins.html
 
+import pytest
+
 # Allow use of the testdir fixture
 pytest_plugins = ("pytester",)
 
@@ -32,6 +34,7 @@ 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
     '''
index 09cb06677425fa9fdaf17620e914b4928f09a8e3..919e738e44f9687d132bc8a0844066434fe69bd9 100644 (file)
 
 # 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
     '''
@@ -45,6 +48,7 @@ def test_pgwui_entry_point_there(monkeypatch):
         is True)
 
 
+@pytest.mark.unittest
 def test_pgwui_entry_point_not_there(monkeypatch):
     '''False when the component is not pgwui.components entry point
     '''
index 28c2c722946caa030413f28382a2ccaf96a45c8d..a9a8508b739f754f6ab8bade2b6968e1970894e3 100644 (file)
@@ -23,6 +23,8 @@
 # See: https://pytest-cov.readthedocs.io/en/latest/plugins.html
 
 
+import pytest
+
 import sys
 
 from pgwui_testing import testing
@@ -43,6 +45,7 @@ mocked_func = testing.make_mock_fixture(
     sys.modules[__name__], 'func_to_mock')
 
 
+@pytest.mark.integrationtest
 def test_make_mock_fixture_fixture(mocked_func):
     # The mock of the function works
 
@@ -70,6 +73,7 @@ class TestClass():
 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