代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt-python 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 8f41e98220749e64164a5c9346e9875af3489a1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
Date: Tue, 6 Apr 2021 20:07:25 +0200
Subject: [PATCH 1/6] setup: use pytest instead of nose to run the test suite
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The software we use for running tests - nose - has been
deprecated in favor of nose2.
We don't use anything nose-specific, just unittest.TestCase,
which pytest can handle just fine.
Switch to using pytest, which we already use for libvirt-dbus.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
setup.py | 16 ++++++++--------
tox.ini | 4 ++--
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/setup.py b/setup.py
index 56b6eea..ffb0e13 100755
--- a/setup.py
+++ b/setup.py
@@ -292,13 +292,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:
@@ -306,7 +306,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):
"""
@@ -320,8 +320,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
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。