[TIP] pytest in the Python shell

Ronny Pfannschmidt Ronny.Pfannschmidt at gmx.de
Wed Aug 1 14:54:40 PDT 2012


Python itself does not have safe code reloading,
its strongly suggested to just run new processes

and also the reason why py.test does not include such a tool
its just too easy to get strange breakages

whats wrong with just running a suboprocess or py.test from the normal 

-- Ronny

On 08/01/2012 11:33 PM, Isaac Gonzalez wrote:
> 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!
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

More information about the testing-in-python mailing list