mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Work around for longer object lifetimes on pypy
On pypy the subordinate LED objects in RGBLED composite objects do die on failed construction ... eventually. Unfortunately it's not quick enough to prevent the following tests from failing. As we can't know for certain exactly which test is going to follow, it's best to simply clear down the reservation table before each test.
This commit is contained in:
@@ -34,6 +34,7 @@ def setup_function(function):
|
||||
|
||||
def teardown_function(function):
|
||||
Device._pin_factory.reset()
|
||||
Device._reservations.clear()
|
||||
|
||||
def teardown_module(module):
|
||||
# make sure we reset the default
|
||||
|
||||
Reference in New Issue
Block a user