代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/python-hatch-vcs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From dc54e798d83d513c8a3aefee4970c9389497ebf9 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Mon, 19 Dec 2022 20:20:11 -0500
Subject: [PATCH] Work with setuptools_scm 7.1 (fix #25)
Reference: https://github.com/ofek/hatch-vcs/pull/26
Make test_write less brittle (see also #8, #9) so that it works with
_version.py files generated by at least setuptools_scm 7.1, 7.0, and
6.x.
---
tests/test_build.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/test_build.py b/tests/test_build.py
index 2fde601..7c76343 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -75,8 +75,10 @@ def test_write(new_project_write):
assert os.path.isfile(version_file)
lines = read_file(version_file).splitlines()
- assert lines[3].startswith(('version =', '__version__ ='))
- assert lines[3].endswith("version = '1.2.3'")
+ version_starts = ('version = ', '__version__ = ')
+ assert any(line.startswith(version_starts) for line in lines)
+ version_line = next(line for line in lines if line.startswith(version_starts))
+ assert version_line.endswith(" = '1.2.3'")
@pytest.mark.skipif(sys.version_info[0] == 2, reason='Depends on fix in 6.4.0 which is Python 3-only')
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。