3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Data-Driven Tests - library to multiply test cases
8 Summary(pl.UTF-8): Data-Driven Tests - biblioteka do zwielokrotniania przypadków testowych
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/ddt/
15 Source0: https://files.pythonhosted.org/packages/source/d/ddt/ddt-%{version}.tar.gz
16 # Source0-md5: 1270d706454088ea108f23fbaa800e56
17 Patch0: %{name}-mock.patch
18 URL: https://github.com/txels/ddt
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-mock
23 BuildRequires: python-modules >= 1:2.7
24 BuildRequires: python-setuptools
27 BuildRequires: python3-modules >= 1:3.3
28 BuildRequires: python3-setuptools
30 Requires: python-modules >= 1:2.7
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 DDT (Data-Driven Tests) allows you to multiply one test case by
36 running it with different test data, and make it appear as multiple
39 %description -l pl.UTF-8
40 Biblioteka DDT (Data-Driven Tests - testy sterowane danymi) pozwala na
41 zwielotnianie pojedynczego przypadku testowego poprzez uruchamianie go
42 z różnymi danymi testowymi i traktowanie go jako wielu przypadków
45 %package -n python3-ddt
46 Summary: Data-Driven Tests - library to multiply test cases
47 Summary(pl.UTF-8): Data-Driven Tests - biblioteka do zwielokrotniania przypadków testowych
48 Group: Libraries/Python
49 Requires: python3-modules >= 1:3.3
51 %description -n python3-ddt
52 DDT (Data-Driven Tests) allows you to multiply one test case by
53 running it with different test data, and make it appear as multiple
56 %description -n python3-ddt -l pl.UTF-8
57 Biblioteka DDT (Data-Driven Tests - testy sterowane danymi) pozwala na
58 zwielotnianie pojedynczego przypadku testowego poprzez uruchamianie go
59 z różnymi danymi testowymi i traktowanie go jako wielu przypadków
63 %setup -q -n ddt-%{version}
68 %py_build %{?with_tests:test}
72 %py3_build %{?with_tests:test}
76 rm -rf $RPM_BUILD_ROOT
89 rm -rf $RPM_BUILD_ROOT
93 %defattr(644,root,root,755)
94 %doc LICENSE.md README.md
95 %{py_sitescriptdir}/ddt.py[co]
96 %{py_sitescriptdir}/ddt-%{version}-py*.egg-info
100 %files -n python3-ddt
101 %defattr(644,root,root,755)
102 %doc LICENSE.md README.md
103 %{py3_sitescriptdir}/ddt.py
104 %{py3_sitescriptdir}/__pycache__/ddt.cpython-*.py[co]
105 %{py3_sitescriptdir}/ddt-%{version}-py*.egg-info