mirror of https://github.com/pulumi/pulumi.git
![]() The previous attempt to allow this didn't actually allow it, so this is take two. As part of the previous attempt, I thought after tweaking the test I had observed the test failing, and then succeeding after making the product changes, but I must have been mistaken. It turns out that our existing mocks tests weren't running at all because of a missing `__init__.py` file. Once the missing `__init__.py` is added, the tests run, but other tests ("test mode" tests) fail because the code that creates the mocks and resources will run during test discovery, and setting the mocks modifies global state. To address the test issue, I've moved the mocks tests into their own `test_with_mocks` package that can be run separately from other tests. And addressed the original issue, by creating a root Stack resource if one isn't already present when the mocks are set. |
||
---|---|---|
.. | ||
__init__.py | ||
resources.py | ||
test_testing_with_mocks.py |