diff --git a/vasl_templates/webapp/tests/remote.py b/vasl_templates/webapp/tests/remote.py index 5d07e60..41ea293 100644 --- a/vasl_templates/webapp/tests/remote.py +++ b/vasl_templates/webapp/tests/remote.py @@ -135,6 +135,7 @@ class ControlTests: """Return the available VASL modules.""" try: dname = pytest.config.option.vasl_mods #pylint: disable=no-member + assert dname, "--vasl-mods was not specified." except AttributeError: dname = app.config[ "TEST_VASL_MODS" ] fspec = os.path.join( dname, "*.vmod" ) @@ -148,6 +149,7 @@ class ControlTests: if extns_dtype == "real": try: dname = pytest.config.option.vasl_extensions #pylint: disable=no-member + assert dname, "--vasl-extensions was not specified." except AttributeError: dname = app.config[ "TEST_VASL_EXTNS_DIR" ] elif extns_dtype == "test": @@ -223,6 +225,7 @@ class ControlTests: """Get the available VASSAL engines.""" try: dname = pytest.config.option.vassal #pylint: disable=no-member + assert dname, "--vassal was not specified." except AttributeError: dname = app.config[ "TEST_VASSAL_ENGINES" ] vassal_engines = [] @@ -247,6 +250,7 @@ class ControlTests: if dtype == "real": try: dname = pytest.config.option.vo_notes #pylint: disable=no-member + assert dname, "--vo-notes was not specified." except AttributeError: dname = _ORIG_CHAPTER_H_NOTES_DIR elif dtype == "test": diff --git a/vasl_templates/webapp/tests/test_capabilities.py b/vasl_templates/webapp/tests/test_capabilities.py index 734e612..c677af0 100644 --- a/vasl_templates/webapp/tests/test_capabilities.py +++ b/vasl_templates/webapp/tests/test_capabilities.py @@ -395,6 +395,10 @@ def test_theater_capabilities( webapp, webdriver ): pytest.config.option.short_tests, #pylint: disable=no-member reason = "--short-tests specified" ) +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) @pytest.mark.skipif( not pytest.config.option.vasl_extensions, #pylint: disable=no-member reason = "--vasl-extensions not specified" diff --git a/vasl_templates/webapp/tests/test_online_images.py b/vasl_templates/webapp/tests/test_online_images.py index 510612f..cd51e65 100644 --- a/vasl_templates/webapp/tests/test_online_images.py +++ b/vasl_templates/webapp/tests/test_online_images.py @@ -2,6 +2,7 @@ import re +import pytest from selenium.webdriver.common.action_chains import ActionChains from vasl_templates.webapp.tests.utils import init_webapp, select_tab, \ @@ -15,6 +16,10 @@ SCENARIO_IMAGES_SOURCE_INTERNET = 2 # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) def test_online_images( webapp, webdriver ): """Test using online images in VASL scenarios.""" @@ -71,6 +76,10 @@ def test_online_images( webapp, webdriver ): # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) def test_multiple_images( webapp, webdriver ): """Test handling of VASL counters that have multiple images.""" @@ -123,6 +132,14 @@ def test_multiple_images( webapp, webdriver ): # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) +@pytest.mark.skipif( + not pytest.config.option.vasl_extensions, #pylint: disable=no-member + reason = "--vasl-extensions not specified" +) def test_extensions( webapp, webdriver ): """Test handling of VASL counters in extensions.""" diff --git a/vasl_templates/webapp/tests/test_vasl_extensions.py b/vasl_templates/webapp/tests/test_vasl_extensions.py index a0abf60..29d6da1 100644 --- a/vasl_templates/webapp/tests/test_vasl_extensions.py +++ b/vasl_templates/webapp/tests/test_vasl_extensions.py @@ -17,6 +17,10 @@ from vasl_templates.webapp.tests.test_vehicles_ordnance import add_vo # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) def test_load_vasl_extensions( webapp, webdriver ): """Test loading VASL extensions.""" @@ -55,6 +59,10 @@ def test_load_vasl_extensions( webapp, webdriver ): # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) def test_vasl_extension_info( webapp, webdriver ): """Test matching VASL extensions with our extension info files.""" @@ -87,6 +95,10 @@ def test_vasl_extension_info( webapp, webdriver ): # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) @pytest.mark.skipif( not pytest.config.option.vasl_extensions, #pylint: disable=no-member reason = "--vasl-extensions not specified" @@ -158,6 +170,10 @@ def test_dedupe_ma_notes( webapp, webdriver ): # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) @pytest.mark.skipif( not pytest.config.option.vasl_extensions, #pylint: disable=no-member reason = "--vasl-extensions not specified" @@ -231,6 +247,10 @@ def test_kgs_extensions( webapp, webdriver ): # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) @pytest.mark.skipif( not pytest.config.option.vasl_extensions, #pylint: disable=no-member reason = "--vasl-extensions not specified" @@ -297,6 +317,10 @@ def test_bfp_extensions( webapp, webdriver ): # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) @pytest.mark.skipif( not pytest.config.option.vasl_extensions, #pylint: disable=no-member reason = "--vasl-extensions not specified" diff --git a/vasl_templates/webapp/tests/test_vo_notes.py b/vasl_templates/webapp/tests/test_vo_notes.py index 5b9cff5..ba9b07c 100644 --- a/vasl_templates/webapp/tests/test_vo_notes.py +++ b/vasl_templates/webapp/tests/test_vo_notes.py @@ -448,6 +448,10 @@ def test_special_cases( webapp, webdriver ): ) #pylint: disable=too-many-locals,too-many-branches # NOTE: The expected output files contain pieces from the supported extensions, # so the VASL extensions directory must be loaded. +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" + ) @pytest.mark.skipif( not pytest.config.option.vasl_extensions, #pylint: disable=no-member reason = "--vasl-extensions not specified" diff --git a/vasl_templates/webapp/tests/test_vo_reports.py b/vasl_templates/webapp/tests/test_vo_reports.py index 4e2c79e..e8cf25f 100644 --- a/vasl_templates/webapp/tests/test_vo_reports.py +++ b/vasl_templates/webapp/tests/test_vo_reports.py @@ -17,10 +17,14 @@ from vasl_templates.webapp.tests.utils import init_webapp, get_nationalities, fi # NOTE: The expected output files contain pieces from the supported extensions, # so the VASL extensions directory must be loaded. +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) @pytest.mark.skipif( not pytest.config.option.vasl_extensions, #pylint: disable=no-member reason = "--vasl-extensions not specified" - ) #pylint: disable=too-many-locals +) #pylint: disable=too-many-locals def test_vo_reports( webapp, webdriver ): #pylint: disable=too-many-locals """Check the vehicle/ordnance reports."""