mirror of
https://github.com/OpenFreeEnergy/openfe.git
synced 2026-06-05 06:44:24 +08:00
* Initial skeleton for the CLI Currently requires the OPS CLI to be installed as well; next steps: 1. Add parameter core classes to infrastructure 2. Fully separate infrastructure into its own package * switch to using plugcli * tests for CLI * helps if you add the tests... * pep8 and deps cleanup * add test_plugins * Start of CLI atommapping report * Add tests for parameters * Almost-working atommapping command * add hack to work-around lomap issue * fix test * pep8; docstrings; add header comments * Add tests for commands/atommapping * docstrings * add init to command to stop circular import error * remove init and it still works? Co-authored-by: richard <richard@nextmovesoftware.com>
17 lines
427 B
Python
17 lines
427 B
Python
import os
|
|
import pytest
|
|
|
|
from plugcli.params import NOT_PARSED
|
|
from openfecli.parameters.utils import import_parameter
|
|
|
|
|
|
@pytest.mark.parametrize('import_str,expected', [
|
|
('os.path.exists', os.path.exists),
|
|
('os.getcwd', os.getcwd),
|
|
('os.foo', NOT_PARSED),
|
|
('foo.bar', NOT_PARSED),
|
|
('foo', NOT_PARSED),
|
|
])
|
|
def test_import_parameter(import_str, expected):
|
|
assert import_parameter(import_str) is expected
|