pytest stops collecting tests when pysaunter release is newer than 0.50
Closed this issue · 6 comments
Hi Adam,
Currently I have the following packages installed and everything works fine :
pytest==2.2.4
pytest-marks==0.3
py.saunter==0.50
As soon as I update py.saunter to a newer release (e.g. 0.59) the pytest fails to collect any tests. Collections starts but returns zero scripts for execution. As soon as I downgrade py.saunter everything returns back to normal.
Cheers
Alexis
Complete list of packages:
Brlapi==0.5.4
CouchDB==0.6
GnuPGInterface==0.3.2
HARPy==0.2.0
Mako==0.2.5
PAM==0.4.2
PIL==1.1.7
Twisted-Core==10.0.0
Twisted-Names==10.0.0
Twisted-Web==10.0.0
adium-theme-ubuntu==0.1
apturl==0.4.1ubuntu4.1
argparse==1.2.1
autopep8==0.8
browsermob-proxy==0.2.0
command-not-found==0.1
configglue==0.2dev
cups==1.0
distribute==0.6.28
execnet==1.1
fstab==1.4
fuzzywuzzy==0.1
gnome-app-install==0.4.2ubuntu2
httplib2==0.7.2
jockey==0.5.8
launchpadlib==1.6.0
lazr.restfulclient==0.9.11
lazr.uri==1.0.2
lettuce==0.2.6
louis==1.7.0
mechanize==0.2.5
nose==1.1.2
nvidia-common==0.0.0
oauth==1.0a
onboard==0.93.0
papyon==0.4.8
pep8==1.3.3
pexpect==2.3
proboscis==1.2.5.3
protobuf==2.2.0
py==1.4.9
py.saunter==0.50
pyOpenSSL==0.10
pycrypto==2.0.1
pycurl==7.19.0
pyinotify==0.8.9
pyserial==2.3
pytest==2.2.4
pytest-marks==0.3
pytest-xdist==1.8
python-apt==0.7.94.2ubuntu6.4
python-debian==0.1.14ubuntu2
pyxdg==0.18
rdflib==2.4.2
requests==0.13.5
screen-resolution-extra==0.0.0
selenium==2.25.0
simplejson==2.0.9
smbc==1.0
speechd==0.3
speechd-config==0.0
sure==1.0.0alpha
system-service==0.1.6
ubuntuone-storage-protocol==1.2.0
ufw==0.30pre1-0ubuntu2
unattended-upgrades==0.1
unittest2==0.5.1
usb-creator==0.2.22
virtkey==0.01
virtualenv==1.7.2
wadllib==1.1.4
wsgiref==0.1.2
xkit==0.0.0
zope.interface==3.5.3
@alexi0us check the pytest.ini. If your test functions and classes don't start with Check
or test
they won't be picked up.
@carolmirakove Thanks for your reply. All my tests start with test :-).
I am able to run the tests without any problems with the package list listed above (pysaunter 0.5). As soon as I update pysaunter, collection returns 0 tests. Its very weird problem.
It took me a day of debugging to understand that this issue is related to pysaunter - in the beginning I thought I was doing something wrong with pytest. To me it looks like that there is some kind of incompatibility between pytest and pysaunter versions but I can't really say what that is.
Cheers
Alexis
Ah well, sorry it wasn't that easy! I've seen that problem in the past so I thought it was worth a shot :)
FWIW I am running Py.Saunter 0.56 and pytest-2.3.4 with no problems.
No problem. Its always good to ask the obvious questions :-)
I have updated pytest to 2.3.4 and py,saunter to 0.56 but still the same result. Not sure if its related but whats your py-marks version?
I've got pytest-marks 0.4
From the release notes :
because the unittest stuff is gone, the collection algorithm is slightly different, which means the rules in pytest.ini are now being followed. The original rule that was unenforced was that your test methods must start with Check. CheckFoo, CheckBar, CheckFlyingMonkey etc. If you are using Test, or Scalpel or whatever, you can tweak the python_classes line to have the prefix you are using, or if you are using multiple prefixes it is a space delimited list.
Sorry for that. I was blind!