You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ops_test fixture has module scope, and it is very convenient to have the model destroyed when I move from one test_*.py to another.
However, I use the same *.charm in all my test_*.py, so fixture such as
@pytest.fixture(scope="module")asyncdefcharm_under_test(ops_test: OpsTest) ->Path:
"""Charm used for integration testing."""return=awaitops_test.build_charm(".")
would still cause my charm to be built again and again as the test progresses throughout the test_*.py files.
It would be handy to be able to have a charm "persist" without tricks such as
The
ops_test
fixture has module scope, and it is very convenient to have the model destroyed when I move from onetest_*.py
to another.However, I use the same
*.charm
in all mytest_*.py
, so fixture such aswould still cause my charm to be built again and again as the test progresses throughout the
test_*.py
files.It would be handy to be able to have a charm "persist" without tricks such as
Which brings me to a question: I wonder if the design approach is:
ops_test
in module scope is desirableawait ops_test.model.reset()
at the end of every test functionThe text was updated successfully, but these errors were encountered: