1 # TODO: why tests fail with python 2.7?
4 %bcond_without tests # make check
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Testscenarios - pyunit extension for dependency injection
9 Summary(pl.UTF-8): Testscenarios - rozszerzenie pyunit do wstrzykiwania zależności
10 Name: python-testscenarios
13 License: Apache v2.0 or BSD
14 Group: Libraries/Python
15 #Source0Download: https://pypi.python.org/simple/testscenarios/
16 Source0: https://pypi.python.org/packages/source/t/testscenarios/testscenarios-%{version}.tar.gz
17 # Source0-md5: 859073d9e7b049aee2e6704c51f6001a
18 URL: https://launchpad.net/testscenarios
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 1:2.6
23 BuildRequires: python-pbr >= 0.11
24 BuildRequires: python-setuptools
25 BuildRequires: python-testtools
28 BuildRequires: python3-modules >= 1:3.2
29 BuildRequires: python3-pbr >= 0.11
30 BuildRequires: python3-setuptools
31 BuildRequires: python3-testtools
33 Requires: python-modules >= 1:2.6
34 Requires: python-pbr >= 0.11
35 Requires: python-testtools
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 testscenarios provides clean dependency injection for python unittest
41 style tests. This can be used for interface testing (testing many
42 implementations via a single test suite) or for classic dependency
43 injection (provide tests with dependencies externally to the test code
44 itself, allowing easy testing in different situations).
46 %description -l pl.UTF-8
47 Moduł testscenarios zapewnia czyste wstrzykiwanie zależności dla
48 testów pythonowych w stylu unittest. Może to być używane do testowania
49 interfejsów (testowania wielu implementacji poprzez prosty zestaw
50 testów) albo klasycznego wstrzykiwania zależności (dostarczania testów
51 z zależnościami zewnętrznymi w stosunku do kodu testującego, co
52 pozwala na łatwiejsze testowanie w różnych sytuacjach).
54 %package -n python3-testscenarios
55 Summary: Testscenarios - pyunit extension for dependency injection
56 Summary(pl.UTF-8): Testscenarios - rozszerzenie pyunit do wstrzykiwania zależności
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.2
59 Requires: python3-pbr >= 0.11
60 Requires: python3-testtools
62 %description -n python3-testscenarios
63 testscenarios provides clean dependency injection for python unittest
64 style tests. This can be used for interface testing (testing many
65 implementations via a single test suite) or for classic dependency
66 injection (provide tests with dependencies externally to the test code
67 itself, allowing easy testing in different situations).
69 %description -n python3-testscenarios -l pl.UTF-8
70 Moduł testscenarios zapewnia czyste wstrzykiwanie zależności dla
71 testów pythonowych w stylu unittest. Może to być używane do testowania
72 interfejsów (testowania wielu implementacji poprzez prosty zestaw
73 testów) albo klasycznego wstrzykiwania zależności (dostarczania testów
74 z zależnościami zewnętrznymi w stosunku do kodu testującego, co
75 pozwala na łatwiejsze testowanie w różnych sytuacjach).
78 %setup -q -n testscenarios-%{version}
84 # tests fail with python 2.x - too old unittest?
85 #%{?with_tests:%{__make} check PYTHON=%{__python}}
91 %{?with_tests:%{__make} check PYTHON=%{__python3}}
95 rm -rf $RPM_BUILD_ROOT
101 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/testscenarios/tests
106 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/testscenarios/tests
110 rm -rf $RPM_BUILD_ROOT
114 %defattr(644,root,root,755)
115 %doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README
116 %{py_sitescriptdir}/testscenarios
117 %{py_sitescriptdir}/testscenarios-%{version}-py*.egg-info
121 %files -n python3-testscenarios
122 %defattr(644,root,root,755)
123 %doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README
124 %{py3_sitescriptdir}/testscenarios
125 %{py3_sitescriptdir}/testscenarios-%{version}-py*.egg-info