From 83f25cbc16e7a2377336f80915af359fb8bbd2db Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 17 Oct 2019 12:38:35 +0300 Subject: [PATCH] Fix tests --- tests/test_pkgmanifest.py | 16 ++++++++-------- tox.ini | 2 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/test_pkgmanifest.py b/tests/test_pkgmanifest.py index 95a9af43..ccafa35f 100644 --- a/tests/test_pkgmanifest.py +++ b/tests/test_pkgmanifest.py @@ -170,7 +170,7 @@ sentence=This is Arduino library } -def test_library_json_model(): +def test_library_json_schema(): contents = """ { "name": "ArduinoJson", @@ -255,7 +255,7 @@ def test_library_json_model(): ) -def test_library_properties_model(): +def test_library_properties_schema(): contents = """ name=U8glib version=1.19.1 @@ -351,7 +351,7 @@ includes=MozziGuts.h ) -def test_platform_json_model(): +def test_platform_json_schema(): contents = """ { "name": "atmelavr", @@ -404,7 +404,7 @@ def test_platform_json_model(): raw_data = parser.ManifestParserFactory.new( contents, parser.ManifestFileType.PLATFORM_JSON ).as_dict() - + raw_data["frameworks"] = sorted(raw_data["frameworks"]) data, errors = ManifestSchema(strict=False).load(raw_data) assert not errors @@ -426,13 +426,13 @@ def test_platform_json_model(): "url": "https://github.com/platformio/platform-atmelavr.git", "type": "git", }, - "frameworks": ["arduino", "simba"], + "frameworks": sorted(["arduino", "simba"]), "version": "1.15.0", - }, + } ) -def test_package_json_model(): +def test_package_json_schema(): contents = """ { "name": "tool-scons", @@ -591,7 +591,7 @@ def test_examples_from_dir(tmpdir_factory): ) -def test_broken_models(): +def test_broken_schemas(): # non-strict mode data, errors = ManifestSchema(strict=False).load(dict(name="MyPackage")) assert set(errors.keys()) == set(["version"]) diff --git a/tox.ini b/tox.ini index 29384ca2..fc31f45e 100644 --- a/tox.ini +++ b/tox.ini @@ -50,8 +50,6 @@ commands = sphinx-build -W -b linkcheck docs docs/_build/html [testenv:skipexamples] -deps = - pytest commands = py.test -v --basetemp="{envtmpdir}" tests --ignore tests/test_examples.py