From 3c8e0ceb93df36bf2fdeeec663994185f4639e3b Mon Sep 17 00:00:00 2001 From: Taka Date: Mon, 8 Oct 2018 13:21:12 +0000 Subject: [PATCH] Fixed some tests if no VASL modules are provided. --- vasl_templates/webapp/tests/test_counters.py | 2 ++ vasl_templates/webapp/tests/test_vehicles_ordnance.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/vasl_templates/webapp/tests/test_counters.py b/vasl_templates/webapp/tests/test_counters.py index ff8399d..0ae93d4 100644 --- a/vasl_templates/webapp/tests/test_counters.py +++ b/vasl_templates/webapp/tests/test_counters.py @@ -25,6 +25,8 @@ from vasl_templates.webapp.tests.utils import load_vasl_mod def test_counter_images( webapp, monkeypatch ): """Test that counter images are served correctly.""" + # NOTE: This is ridiculously slow on Windows :-/ + # figure out which pieces we're interested in gpids = get_vo_gpids( DATA_DIR ) diff --git a/vasl_templates/webapp/tests/test_vehicles_ordnance.py b/vasl_templates/webapp/tests/test_vehicles_ordnance.py index 26c3ab9..d81a97c 100644 --- a/vasl_templates/webapp/tests/test_vehicles_ordnance.py +++ b/vasl_templates/webapp/tests/test_vehicles_ordnance.py @@ -4,6 +4,7 @@ import os import re import json +import pytest from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support.ui import Select from selenium.webdriver.common.keys import Keys @@ -219,6 +220,10 @@ def test_variable_capabilities( webapp, webdriver ): # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) def test_html_names( webapp, webdriver, monkeypatch ): """Test handling of vehicles/ordnance that have HTML in their name.""" @@ -278,6 +283,10 @@ def test_html_names( webapp, webdriver, monkeypatch ): # --------------------------------------------------------------------- +@pytest.mark.skipif( + not pytest.config.option.vasl_mods, #pylint: disable=no-member + reason = "--vasl-mods not specified" +) #pylint: disable=too-many-statements def test_vo_images( webapp, webdriver, monkeypatch ): #pylint: disable=too-many-statements """Test handling of vehicles/ordnance that have multiple images."""