Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to ignore test/conftest.py in py.test?

Tags:

pytest

Without moving any code around (I realise I could refactor but for various reasons that is inconvenient), is there a way to call py.test whilst ignoring conftest.py?

I'd thought:

py.test -p no:pytestconfig

might work, but it seems like it doesn't.

like image 412
sanga Avatar asked Mar 19 '15 11:03

sanga


1 Answers

Use:

py.test --noconftest 

According to py.test --help:

--noconftest Don't load any conftest.py files.

like image 128
Ionut Grigorescu Avatar answered Oct 06 '22 23:10

Ionut Grigorescu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!