Skip to content

Commit

Permalink
Test issue #1542
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson committed Feb 6, 2023
1 parent 7246056 commit abb5a18
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions openff/toolkit/tests/test_forcefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -1960,6 +1960,19 @@ class BogusHandler(ParameterHandler):
assert force_field["bogus"] is not None


class TestForceFieldPluginLoading:
def test_handlers_tracked_if_already_loaded(self):
"""Reproduce issue #1542."""
from openff.toolkit.typing.engines.smirnoff.plugins import load_handler_plugins

plugins = load_handler_plugins()

# This might need to be updated if we ship, by default, other plugins
assert len(plugins) == 1, "that 1 ParameterHandler plugin is available"

assert ForceField()._plugin_parameter_handler_classes == plugins


class TestForceFieldSerializaiton(_ForceFieldFixtures):
def test_json_dump(self, force_field):
"""Test that at a ForceField can at least be dumped to JSON without error."""
Expand Down

0 comments on commit abb5a18

Please # to comment.