From 00c6e3ddc157737dde19cc3f2e3bf5efde2c3feb Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Fri, 27 Aug 2021 12:16:37 +0200 Subject: [PATCH] Add test_check_existing() --- message_ix/tests/tools/test_check.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/message_ix/tests/tools/test_check.py b/message_ix/tests/tools/test_check.py index 9ccb8c4b1..075111416 100644 --- a/message_ix/tests/tools/test_check.py +++ b/message_ix/tests/tools/test_check.py @@ -43,3 +43,27 @@ def test_check_westeros(test_mp): # Checks fail results = check(scen, config=config) assert not results[0] + + +@pytest.mark.parametrize( + "url, config", + [ + # ("ixmp://platform/model/scenario#version", dict()), + ], +) +def test_check_existing(url, config): + """Check existing scenarios. + + For local use only: extend the list of parameters, above, but do not commit + additions to ``main``. + """ + # import pint + # from iam_units import registry + # + # pint.set_application_registry(registry) + + scen, mp = Scenario.from_url(url) + results = check(scen, config=config) + + # Checks all pass + assert results[0], "\n".join(map(str, results))