[TIP] pytest in the Python shell

Isaac Gonzalez isaac at kiip.me
Wed Aug 1 14:33:51 PDT 2012


Hi!

I am running pytest from within the Python shell. For instance:

pytest.main('tests/api')

When I change the test file inside the folder, to fix the test, the
python shell and pytest seems to have cached the results of the test
and gives the same output when I re-run the above command.

If I restart the shell it reads the file again and gives the new
output from the test. Is there a way to have pytest reload the test
with out restarting the shell and importing pytest again?

Thanks!



More information about the testing-in-python mailing list