From c5f55d39bb316c4019e7ad1fd886223f1a3c6e42 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 30 Jun 2022 13:58:08 -0300 Subject: [PATCH] Removed test_check_scripts, no longer used --- tests/test_plot/test_script_checks.py | 43 --------------------------- 1 file changed, 43 deletions(-) delete mode 100644 tests/test_plot/test_script_checks.py diff --git a/tests/test_plot/test_script_checks.py b/tests/test_plot/test_script_checks.py deleted file mode 100644 index 43be160e..00000000 --- a/tests/test_plot/test_script_checks.py +++ /dev/null @@ -1,43 +0,0 @@ -""" -Tests the checks for utilities - -For debug information use: -pytest-3 --log-cli-level debug - -""" - -import pytest -import coverage -from . import context # noqa: F401 -from kibot.misc import MISSING_TOOL, CMD_EESCHEMA_DO -from kibot.kiplot import check_version -import kibot.kiplot - - -cov = coverage.Coverage() - - -def test_check_version_1(caplog): - cov.load() - cov.start() - with pytest.raises(SystemExit) as pytest_wrapped_e: - check_version('ls', '1.1.1') - cov.stop() - cov.save() - assert pytest_wrapped_e.type == SystemExit - assert pytest_wrapped_e.value.code == MISSING_TOOL - assert "Unable to determine ls version" in caplog.text - - -def test_check_version_2(caplog): - # Avoid interaction with other tests: reset the versions cache - kibot.kiplot.script_versions = {} - cov.load() - cov.start() - with pytest.raises(SystemExit) as pytest_wrapped_e: - check_version(CMD_EESCHEMA_DO, '20.1.1') - cov.stop() - cov.save() - assert pytest_wrapped_e.type == SystemExit - assert pytest_wrapped_e.value.code == MISSING_TOOL - assert "Wrong version for `eeschema_do`" in caplog.text