Py.test: excessive memory usage with lots of tests

I use py.test (version 2.4, on Windows 7) with xdist to run a series of numerical regression tests and an interface for the C ++ library, which provides the Python interface through the C module.

Over time, the number of tests has grown to ~ 2000, but now we are faced with some memory problems. Whether using xdist or not, memory usage for the python process executing the tests seems to be constantly increasing.

In single-process mode, we even saw several problems with bad placement errors, while using the total cost of memory, xdist can reduce the operating system (8 processes, each of which uses> 1 GB at the end).

Is this the expected behavior? Or is someone else experiencing the same problem when using py.test for a lot of tests? Is there something I can do in tearDown (class) to reduce memory usage over time?

At the moment, I cannot rule out the possibility of a problem lying somewhere inside the C / C ++ code, but when I run some long-term program that uses this code through the Python interface outside of py.test, I see a relatively constant memory usage over time. I also do not see excessive memory usage when using the nose instead of py.test (we use py.test since we need a junit-xml report to work with multiple processes)

+5
source share
2 answers

py.test . , , , , . .

. CI-, , . CI 2G 3500 , , , . Pypy , py.test, , , .

, C- , () script, API ( py.test) . .

+2

. 4600 . pytest, , ( "" "" "" ). .

0

All Articles