This commit is contained in:
Ivan Kravets
2020-03-04 18:14:51 +02:00
parent fbb62fa8a6
commit 3275bb59bf
2 changed files with 4 additions and 6 deletions

View File

@@ -1,3 +0,0 @@
[style]
blank_line_before_nested_class_or_def = true
allow_multiline_lambdas = true

View File

@@ -162,9 +162,10 @@ def test_module_json_parser():
} }
""" """
mp = parser.ModuleJsonManifestParser(contents) raw_data = parser.ModuleJsonManifestParser(contents).as_dict()
raw_data["dependencies"] = sorted(raw_data["dependencies"], key=lambda a: a["name"])
assert not jsondiff.diff( assert not jsondiff.diff(
mp.as_dict(), raw_data,
{ {
"name": "YottaLibrary", "name": "YottaLibrary",
"description": "This is Yotta library", "description": "This is Yotta library",
@@ -178,12 +179,12 @@ def test_module_json_parser():
"version": "1.2.3", "version": "1.2.3",
"repository": {"type": "git", "url": "git@github.com:username/repo.git"}, "repository": {"type": "git", "url": "git@github.com:username/repo.git"},
"dependencies": [ "dependencies": [
{"name": "usefulmodule", "version": "^1.2.3", "frameworks": ["mbed"]},
{ {
"name": "simplelog", "name": "simplelog",
"version": "ARMmbed/simplelog#~0.0.1", "version": "ARMmbed/simplelog#~0.0.1",
"frameworks": ["mbed"], "frameworks": ["mbed"],
}, },
{"name": "usefulmodule", "version": "^1.2.3", "frameworks": ["mbed"]},
], ],
"customField": "Custom Value", "customField": "Custom Value",
}, },