Pytest warnings are different between first and subsequent runs.
janbet@ub/home/janbet $ cat test_x.py
def test_1():
a = '\d'
janbet@ub/home/janbet $ pytest test_x.py | tail -1
========================= 1 passed, 1 warning in 0.00s =========================
janbet@ub/home/janbet $ pytest test_x.py | tail -1
============================== 1 passed in 0.00s ===============================
Warning appears again after rm -r __pycache__ or touch test_x.py or something like this.
I guess those warnings are created when .py files are read, and when __pycache__ is available and up-to-date they are not read at all. Is this correct?
Is there any simple way to force pytest never to use __pycache__ at all? This is probably not very important, but I have a strong aversion to situations when my test run result depends on some internal files created-or-not during previous runs.