Mod: skip test if thirdparty not found
This commit is contained in:
parent
b08a798c08
commit
88f07abf4a
@ -22,7 +22,7 @@ jobs:
|
|||||||
name: run tests
|
name: run tests
|
||||||
command: |
|
command: |
|
||||||
mkdir test-reports
|
mkdir test-reports
|
||||||
poetry run pytest --cov=anisotropy tests > test-reports/pytest.log 2>&1
|
poetry run pytest --cov=anisotropy --json-report --json-report-file test-reports/pytest.json -v tests
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: test-reports
|
path: test-reports
|
||||||
|
|
||||||
|
33
poetry.lock
generated
33
poetry.lock
generated
@ -441,6 +441,29 @@ pytest = ">=4.6"
|
|||||||
[package.extras]
|
[package.extras]
|
||||||
testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"]
|
testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pytest-json-report"
|
||||||
|
version = "1.4.1"
|
||||||
|
description = "A pytest plugin to report test results as JSON files"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = "*"
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
pytest = ">=3.8.0"
|
||||||
|
pytest-metadata = "*"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pytest-metadata"
|
||||||
|
version = "1.11.0"
|
||||||
|
description = "pytest plugin for test session metadata"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
pytest = ">=2.9.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "python-dateutil"
|
name = "python-dateutil"
|
||||||
version = "2.8.2"
|
version = "2.8.2"
|
||||||
@ -705,7 +728,7 @@ docs = []
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = ">=3.9,<3.11"
|
python-versions = ">=3.9,<3.11"
|
||||||
content-hash = "edfcde1d18b7acee35be898dd8a766db8bd2c410f3ced8fc8ca3961be213a3c5"
|
content-hash = "33e739eb30938e673a1413c60aa0fdebb255ff3e45e7c19f288b57c02be098fe"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
alabaster = [
|
alabaster = [
|
||||||
@ -1169,6 +1192,14 @@ pytest-cov = [
|
|||||||
{file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"},
|
{file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"},
|
||||||
{file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"},
|
{file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"},
|
||||||
]
|
]
|
||||||
|
pytest-json-report = [
|
||||||
|
{file = "pytest-json-report-1.4.1.tar.gz", hash = "sha256:87206752e1d9c6c86e8fdc66b34b7a452ad82766a621b263cd5e828d19caee55"},
|
||||||
|
{file = "pytest_json_report-1.4.1-py3-none-any.whl", hash = "sha256:722425e8910f62079ed0cf039581e70e042fcba0ca8f91094df2ef2239d3f8de"},
|
||||||
|
]
|
||||||
|
pytest-metadata = [
|
||||||
|
{file = "pytest-metadata-1.11.0.tar.gz", hash = "sha256:71b506d49d34e539cc3cfdb7ce2c5f072bea5c953320002c95968e0238f8ecf1"},
|
||||||
|
{file = "pytest_metadata-1.11.0-py2.py3-none-any.whl", hash = "sha256:576055b8336dd4a9006dd2a47615f76f2f8c30ab12b1b1c039d99e834583523f"},
|
||||||
|
]
|
||||||
python-dateutil = [
|
python-dateutil = [
|
||||||
{file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"},
|
{file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"},
|
||||||
{file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"},
|
{file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"},
|
||||||
|
@ -43,6 +43,7 @@ pydeps = {version = "^1.10.12", optional = true}
|
|||||||
peewee-erd = {version = "^0.1.3", optional = true}
|
peewee-erd = {version = "^0.1.3", optional = true}
|
||||||
Sphinx = {version = "^4.3.0", optional = true}
|
Sphinx = {version = "^4.3.0", optional = true}
|
||||||
sphinx-rtd-theme = {version = "^1.0.0", optional = true}
|
sphinx-rtd-theme = {version = "^1.0.0", optional = true}
|
||||||
|
pytest-json-report = "^1.4.1"
|
||||||
|
|
||||||
[tool.poetry.extras]
|
[tool.poetry.extras]
|
||||||
analyze = ["jupyterlab", "seaborn", "sklearn"]
|
analyze = ["jupyterlab", "seaborn", "sklearn"]
|
||||||
|
@ -5,6 +5,16 @@ unittest.TestLoader.sortTestMethodsUsing = None
|
|||||||
|
|
||||||
class TestShaping(unittest.TestCase):
|
class TestShaping(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
try:
|
||||||
|
import netgen
|
||||||
|
NETGEN_MODULE = False
|
||||||
|
|
||||||
|
except ImportError:
|
||||||
|
NETGEN_MODULE = True
|
||||||
|
|
||||||
|
if not NETGEN_MODULE:
|
||||||
|
self.skipTest("Missing Netgen.")
|
||||||
|
|
||||||
from anisotropy import shaping
|
from anisotropy import shaping
|
||||||
|
|
||||||
self.shaping = shaping
|
self.shaping = shaping
|
||||||
|
Loading…
Reference in New Issue
Block a user