From 87cc4afbc3e82633f5f3e676c74b1378b7dd6eb3 Mon Sep 17 00:00:00 2001 From: Randy Barlow Date: Fri, 25 Nov 2016 21:45:02 -0500 Subject: [PATCH] Run tests with setup.py test instead of nosetests. I learned in a ticket that I filed[0] that pymongo 3 tests aren't supposed to be run with nosetests but with setup.py test instead. It turns out that this allows the 8 tests that we had been skipping to pass now. [0] https://jira.mongodb.org/browse/PYTHON-1194 --- python-pymongo.spec | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/python-pymongo.spec b/python-pymongo.spec index 812fe10..3d560a6 100644 --- a/python-pymongo.spec +++ b/python-pymongo.spec @@ -6,7 +6,7 @@ Name: python-pymongo Version: 3.3.0 -Release: 3%{?dist} +Release: 4%{?dist} # All code is ASL 2.0 except bson/time64*.{c,h} which is MIT License: ASL 2.0 and MIT @@ -200,6 +200,12 @@ popd # For some reason, the tests never think they can connect to mongod on armv7hl even though netstat # says it's listening. mongod is not available on ppc64. %ifnarch armv7hl ppc64 + +if [ "$(netstat -ln | grep 27017)" != "" ] +then + pkill mongod +fi + mkdir ./mongod mongod --fork --dbpath ./mongod --logpath ./mongod/mongod.log # Give MongoDB some time to settle @@ -208,24 +214,16 @@ do sleep 1 done -# Some of pymongo's tests are not compatible with the current nose test suite in Rawhide/F25. -# This is reported upstream at https://jira.mongodb.org/browse/PYTHON-1194 - exclude='(^test_command_monitoring_spec$' -exclude+='|^test_crud$' -exclude+='|^test_discovery_and_monitoring$' -exclude+='|^test_gridfs_spec$' -exclude+='|^test_sdam_monitoring_spec$' -exclude+='|^test_server_selection$' -exclude+='|^test_server_selection_rtt$' -exclude+='|^test_uri_spec$' -exclude+=')' -python setup.py nosetests --exclude="$exclude" || (pkill mongod && exit 1) +python setup.py test || (pkill mongod && exit 1) pkill mongod %endif %changelog +* Fri Nov 25 2016 Randy Barlow - 3.3.0-4 +- Run the tests with setup.py test instead of with nosetests. + * Fri Nov 25 2016 Randy Barlow - 3.3.0-3 - Run the tests against a live mongod.