pyresttest
pyresttest copied to clipboard
Add command-line option to reuse contexts between tests & improve imports handling.
This allows people to use imports as adhoc setup/teardown options (albeit without the ability to ignore setup/teardown errors).
- [ ] Create command-line option "--shared-context=True" that is parsed and passed into run_testsets.
- [ ] If shared-context is true, testsets and benchmarks don't get fresh contexts, they reuse the same one (option to receive one already exists).
- [ ] Add test case for this (functional test)
- [ ] Add changelog note about this: in the next release, it will be usable but off by default (to avoid unexpected behavior with existing tests), in the one after, it will be on by default (gives more predictable user behavior).
- [ ] To think about: change import behavior, or add an 'include' element, such that the imported testset executes after current test/benchmark elements, but before the final ones in current testset.
Hi There,
It gives me bellow error:
resttest.py: error: no such option: --shared-context
Thanks
@danghoaidanh It is not implemented yet, this is on the future roadmap for enhancements.
Thanks
Hi @svanoort I implemented this feature in my forked repo: https://github.com/resilva87/pyresttest/tree/feature/shared-context
Quick question: when I try to run the tests (with run_tests.sh
) I keep getting the following error: "django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet."
I'm building and running pyresttest with py3, do you have any ideas?
Thanks!