Commit 85a44e9f authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Test parse cli.

parent 846a3a87
......@@ -5,4 +5,4 @@ from nomad.cli.parse import parse
utils.configure_logging()
parse(sys.argv[1], '.')
parse(sys.argv[1])
......@@ -38,6 +38,7 @@ lazy_import.lazy_module('nomad.metainfo')
lazy_import.lazy_module('nomad.processing')
lazy_import.lazy_module('nomad.client')
lazy_import.lazy_module('nomadcore')
lazy_import.lazy_module('nomadcore.simple_parser')
from . import dev, parse, admin, client # noqa
from .cli import cli # noqa
......
......@@ -29,6 +29,14 @@ from tests.app.test_app import BlueprintClient
# TODO there is much more to test
class TestParse:
def test_parser(self, example_mainfile):
_, mainfile_path = example_mainfile
result = click.testing.CliRunner().invoke(
cli, ['parse', mainfile_path], catch_exceptions=False)
assert result.exit_code == 0
@pytest.mark.usefixtures('reset_config', 'no_warn', 'mongo_infra', 'elastic_infra', 'raw_files_infra')
class TestAdmin:
def test_reset(self, reset_infra):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment