Delete also integrator before creating a new Context
@@ -577,7 +577,7 @@ class TestThermodynamicState(object):
assert state._find_thermostat(context.getSystem()) is not None
# Get rid of old context. This test can create a lot of them.
- del context
+ del context, integrator
def test_method_is_compatible(self):
"""ThermodynamicState context and state compatibility methods."""
