Tightened up configuration options for the test suite.

master
Pacman Ghost 5 years ago
parent 9ecf1f87d4
commit cfc7ab6079
  1. 4
      vasl_templates/webapp/tests/remote.py
  2. 4
      vasl_templates/webapp/tests/test_capabilities.py
  3. 17
      vasl_templates/webapp/tests/test_online_images.py
  4. 24
      vasl_templates/webapp/tests/test_vasl_extensions.py
  5. 4
      vasl_templates/webapp/tests/test_vo_notes.py
  6. 6
      vasl_templates/webapp/tests/test_vo_reports.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":

@ -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"

@ -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."""

@ -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"

@ -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"

@ -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."""

Loading…
Cancel
Save