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>
20 lines
483 B
Python
20 lines
483 B
Python
import pytest
|
|
import click
|
|
|
|
from openfecli.parameters.mapper import get_atommapper
|
|
|
|
from openfe.setup import LomapAtomMapper
|
|
|
|
|
|
@pytest.mark.parametrize("user_input,expected", [
|
|
('LomapAtomMapper', LomapAtomMapper),
|
|
('openfe.setup.LomapAtomMapper', LomapAtomMapper),
|
|
])
|
|
def test_get_atommapper(user_input, expected):
|
|
assert get_atommapper(user_input) is expected
|
|
|
|
|
|
def test_get_atommapper_error():
|
|
with pytest.raises(click.BadParameter):
|
|
get_atommapper("foo")
|