summaryrefslogtreecommitdiff
path: root/setup-use-pytest-instead-of-nose-to-run-the-test-sui.patch
diff options
context:
space:
mode:
Diffstat (limited to 'setup-use-pytest-instead-of-nose-to-run-the-test-sui.patch')
-rw-r--r--setup-use-pytest-instead-of-nose-to-run-the-test-sui.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/setup-use-pytest-instead-of-nose-to-run-the-test-sui.patch b/setup-use-pytest-instead-of-nose-to-run-the-test-sui.patch
new file mode 100644
index 0000000..9d791fb
--- /dev/null
+++ b/setup-use-pytest-instead-of-nose-to-run-the-test-sui.patch
@@ -0,0 +1,57 @@
+diff --git a/setup.py b/setup.py
+index 096576a..4bea21a 100755
+--- a/setup.py
++++ b/setup.py
+@@ -294,13 +294,13 @@ class my_test(Command):
+ self.build_platlib = os.path.join(self.build_base,
+ 'lib' + plat_specifier)
+
+- def find_nosetests_path(self):
++ def find_pytest_path(self):
+ binaries = [
+- "nosetests-%d.%d" % (sys.version_info[0],
++ "pytest-%d.%d" % (sys.version_info[0],
+ sys.version_info[1]),
+- "nosetests-%d" % (sys.version_info[0]),
+- "nosetests%d" % (sys.version_info[0]),
+- "nosetests",
++ "pytest-%d" % (sys.version_info[0]),
++ "pytest%d" % (sys.version_info[0]),
++ "pytest",
+ ]
+
+ for binary in binaries:
+@@ -308,7 +308,7 @@ class my_test(Command):
+ if path is not None:
+ return path
+
+- raise Exception("Cannot find any nosetests binary")
++ raise Exception("Cannot find any pytest binary")
+
+ def run(self):
+ """
+@@ -322,8 +322,8 @@ class my_test(Command):
+ else:
+ os.environ["PYTHONPATH"] = self.build_platlib
+ self.spawn([sys.executable, "sanitytest.py", self.build_platlib, apis[0]])
+- nose = self.find_nosetests_path()
+- self.spawn([sys.executable, nose])
++ pytest = self.find_pytest_path()
++ self.spawn([sys.executable, pytest])
+
+
+ class my_clean(clean):
+diff --git a/tox.ini b/tox.ini
+index de683b9..24c96c2 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -4,7 +4,7 @@ envlist = py36,py37,py38
+ [testenv]
+ deps=
+ lxml
+- nose
++ pytest
+ commands=
+ python sanitytest.py
+- nosetests
++ pytest