def test_missing_params_no_presets(self, load_json, caplog): json_req = self._load_json("multi-params-sets-include-preset.json") multiplex.load_presets(json_req) json1 = multiplex.load_param_sets(load_json) json2 = multiplex.override_presets(json1) assert "An empty param set has been found" in caplog.text assert json2 == None
def test_override_presets(self, load_req): multiplex.load_presets(load_req) json1 = multiplex.load_json_file("tests/JSON/multi-params-sets.json") json2 = multiplex.load_param_sets(json1) json3 = multiplex.override_presets(json2) processed = json.dumps(json3, indent=4, sort_keys=True, separators=(',', ': ')) expected = self._load_json("expected-override-presets.json") assert processed == expected
def test_missing_params_override_presets(self, load_json): multiplex.presets_dict = {} json_req = multiplex.load_json_file( "tests/JSON/requirements-pass.json") multiplex.load_presets(json_req) json1 = multiplex.load_param_sets(load_json) json2 = multiplex.override_presets(json1) processed = json.dumps(json2, indent=4, sort_keys=True, separators=(',', ': ')) expected = self._load_json( "expected-presets-override-missing-params.json") assert processed == expected
def test_presets_def_ess_empty(self, load_req): multiplex.presets_dict = {} multiplex.load_presets(load_req) j1 = multiplex.load_json_file( "tests/JSON/multi-params-sets-include-preset.json") j2 = multiplex.load_param_sets(j1) j3 = multiplex.override_presets(j2) processed = json.dumps(j3, indent=4, sort_keys=True, separators=(',', ': ')) expected = self._load_json( "expected-include-preset-def-ess-empty.json") assert processed == expected