Improve pytest marking
authorKarl O. Pinc <kop@karlpinc.com>
Thu, 17 Dec 2020 07:17:07 +0000 (01:17 -0600)
committerKarl O. Pinc <kop@karlpinc.com>
Thu, 17 Dec 2020 07:17:07 +0000 (01:17 -0600)
tests/test_testing.py

index 236998312de1d537ba69dd5ebd1fc5341786b6e7..16e17d62adcb3dbfe8cb13a74747b2cdc11b4f06 100644 (file)
@@ -45,6 +45,7 @@ mocked_func = testing.make_mock_fixture(
     sys.modules[__name__], 'func_to_mock')
 
 
+@pytest.mark.unittest
 @pytest.mark.integrationtest
 def test_make_mock_fixture_fixture(mocked_func):
     # The mock of the function works
@@ -64,6 +65,7 @@ magic_mocked_func = testing.make_magicmock_fixture(
     sys.modules[__name__], 'func_to_mock')
 
 
+@pytest.mark.unittest
 @pytest.mark.integrationtest
 def test_make_magicmock_fixture_no_autospec(magic_mocked_func):
     # The mock of the function works
@@ -79,6 +81,7 @@ magic_mocked_autospecced_func = testing.make_magicmock_fixture(
     sys.modules[__name__], 'func_to_mock', autospec=True)
 
 
+@pytest.mark.unittest
 @pytest.mark.integrationtest
 def test_make_magicmock_fixture_autospec(magic_mocked_autospecced_func):
     # The mock of the function works
@@ -107,6 +110,7 @@ class TestClass():
 mocked_method = testing.instance_method_mock_fixture('method_to_mock')
 
 
+@pytest.mark.unittest
 @pytest.mark.integrationtest
 def test_instance_method_mock_fixture(mocked_method):
     # The mock of the instance method works
@@ -120,6 +124,8 @@ def test_instance_method_mock_fixture(mocked_method):
     assert result == test_value
 
 
+@pytest.mark.unittest
+@pytest.mark.integrationtest
 def test_instance_method_mock_fixture_unmocked():
     # The test class works after the mocking