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