https://pulumi.com logo
#general
Title
# general
l

little-journalist-4778

10/21/2021, 10:23 AM
Hi, I noticed that during unit testing the Stack is initialised only once and is kept for all the execution, this is a problem for me because during test we execute
register_stack_transformation
and is not removed after a single test execution. I found a workaround to reset the Stack for each test, do you think is good or I'm messing with pulumi internals?
Copy code
@pytest.fixture(autouse=True)
def pulumi_mocks():
    pulumi.runtime.set_mocks(BaseMocks())
    yield
    pulumi.runtime.settings.ROOT = None