Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
687516a088
!17 fix date error
From: @wanglmb 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
2022-12-24 03:47:40 +00:00
wanglimin
42741041fb fix date error 2022-12-24 11:29:09 +08:00
openeuler-ci-bot
fc1da44ce9
!6 解决python-fixtures在22.03分支上python3.9 test fail问题
Merge pull request !6 from xigaoxinyan/openEuler-22.03-LTS-Next
2022-01-11 06:27:21 +00:00
xigaoxinyan
d21eeeac33 add patch 2022-01-10 16:41:29 +08:00
openeuler-ci-bot
73c0bc3e32 !3 Fix source0
From: @kkkl12
Reviewed-by: @yanzh_h
Signed-off-by: @yanzh_h
2020-09-29 14:10:26 +08:00
kkkl12
8b65d57eed Fix Source0 2020-09-29 10:22:04 +08:00
openeuler-ci-bot
22db10581a !2 Remove python2-fixtures subpackage
Merge pull request !2 from ultra_planet/master
2020-08-10 14:24:47 +08:00
lingsheng
ab9fe172c3 Remove python2-fixtures subpackage 2020-08-10 14:14:12 +08:00
openeuler-ci-bot
f1e6bccf9a !1 add yaml
Merge pull request !1 from cuibb1/master
2020-05-09 16:45:27 +08:00
cuibb1
bfdf1084b9 yaml upload 2020-05-09 14:55:21 +08:00
3 changed files with 73 additions and 27 deletions

View File

@ -0,0 +1,45 @@
From 2c87c998801c6ad3259a468ed815f72b2a11e508 Mon Sep 17 00:00:00 2001
From: Javier Pena <jpena@redhat.com>
Date: Thu, 1 Oct 2020 10:59:41 +0200
Subject: [PATCH] Skip tests failing in Python 3.9
Two monkeypatch-related tests are failing in Python 3.9 [1]. While
the cause for the error is figured out, let's skip those two tests
if running in Python 3.9.
[1] - https://github.com/testing-cabal/fixtures/issues/44
---
fixtures/tests/_fixtures/test_monkeypatch.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fixtures/tests/_fixtures/test_monkeypatch.py b/fixtures/tests/_fixtures/test_monkeypatch.py
index 6f11fab..8e89b7a 100644
--- a/fixtures/tests/_fixtures/test_monkeypatch.py
+++ b/fixtures/tests/_fixtures/test_monkeypatch.py
@@ -14,6 +14,7 @@
# limitations under that license.
import functools
+import sys
import testtools
from testtools.matchers import Is
@@ -181,6 +182,7 @@ class TestMonkeyPatch(testtools.TestCase, TestWithFixtures):
self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
C, 'foo_cls')
+ @testtools.skipIf(sys.version_info > (3, 8), "Fails with Python 3.9")
def test_patch_classmethod_with_classmethod(self):
oldmethod = C.foo_cls
oldmethod_inst = C().foo_cls
@@ -212,6 +214,7 @@ class TestMonkeyPatch(testtools.TestCase, TestWithFixtures):
self._check_restored_static_or_class_method(oldmethod, oldmethod_inst,
C, 'foo_cls')
+ @testtools.skipIf(sys.version_info > (3, 8), "Fails with Python 3.9")
def test_patch_classmethod_with_boundmethod(self):
oldmethod = C.foo_cls
oldmethod_inst = C().foo_cls
--
2.26.2

View File

@ -1,28 +1,18 @@
Name: python-fixtures Name: python-fixtures
Version: 3.0.0 Version: 3.0.0
Release: 12 Release: 16
Summary: A python contract for writing reusable state / support logic tests Summary: A python contract for writing reusable state / support logic tests
License: ASL 2.0 or BSD License: ASL 2.0 or BSD
URL: https://launchpad.net/python-fixtures URL: https://launchpad.net/python-fixtures
Source0: http://pypi.python.org/packages/source/f/fixtures/fixtures-%{version}.tar.gz Source0: https://pypi.python.org/packages/source/f/fixtures/fixtures-%{version}.tar.gz
Patch0001: 0001-Skip-tests-failing-in-Python-3.9.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel python2-pbr >= 0.11 python2-mock python2-testtools >= 0.9.22
%description %description
Fixtures is a python contract that provides reusable state / support logic Fixtures is a python contract that provides reusable state / support logic
for unit testing. It includes some helper and adaptation logic to write your for unit testing. It includes some helper and adaptation logic to write your
own fixtures using the fixtures contract. own fixtures using the fixtures contract.
%package -n python2-fixtures
Summary: A python2 contract for reusable state / support logic
Requires: python2-testtools >= 0.9.22 python2-six
%{?python_provide:%python_provide python2-fixtures}
%description -n python2-fixtures
Fixtures is a python2 contract that provides reusable state / support logic
for unit testing. It includes some helper and adaptation logic to write your
own fixtures using the fixtures contract.
%package -n python3-fixtures %package -n python3-fixtures
Summary: A python3 contract for reusable state / support logic Summary: A python3 contract for reusable state / support logic
BuildArch: noarch BuildArch: noarch
@ -36,21 +26,16 @@ for unit testing. It includes some helper and adaptation logic to write your
own fixtures using the fixtures contract. own fixtures using the fixtures contract.
%prep %prep
%autosetup -n fixtures-%{version} %autosetup -n fixtures-%{version} -p1
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
%{__python2} -m testtools.run fixtures.test_suite
%{__python3} -m testtools.run fixtures.test_suite
%files -n python2-fixtures %build
%doc README GOALS NEWS Apache-2.0 BSD COPYING %py3_build
%{python2_sitelib}/fixtures
%{python2_sitelib}/fixtures-%{version}-py?.?.egg-info %install
%py3_install
%check
%{__python3} -m testtools.run fixtures.test_suite
%files -n python3-fixtures %files -n python3-fixtures
%doc README GOALS NEWS Apache-2.0 BSD COPYING %doc README GOALS NEWS Apache-2.0 BSD COPYING
@ -58,5 +43,17 @@ own fixtures using the fixtures contract.
%{python3_sitelib}/fixtures-%{version}-py?.?.egg-info %{python3_sitelib}/fixtures-%{version}-py?.?.egg-info
%changelog %changelog
* Sat Dec 24 2022 wanglimin <wanglimin@xfusion.com> - 3.0.0-16
- Fix date error
* Mon Jan 10 2022 xigaoxinyan <xigaoxinyan@huawei.com> - 3.0.0-15
- add patch for Skip tests failing in Python 3.9
* Tue Sep 29 2020 liuweibo <liuweibo10@huawei.com> - 3.0.0-14
- Fix Source0
* Mon Aug 10 2020 lingsheng <lingsheng@huawei.com> - 3.0.0-13
- Remove python2-fixtures subpackage
* Mon Nov 25 2019 Ling Yang <lingyang2@huawei.com> - 3.0.0-12 * Mon Nov 25 2019 Ling Yang <lingyang2@huawei.com> - 3.0.0-12
- Package init - Package init

4
python-fixtures.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: pypi
src_repo: fixtures
tag_prefix: "^v"
seperator: "."