summaryrefslogtreecommitdiffstats
path: root/admin/python-coverage-test-runner.spec
blob: d7b0936e50e4163f4c8c8678289fce49525711f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

%global pkgname CoverageTestRunner
%global prjname coverage-test-runner

Name:           python-%{prjname}
Version:        1.0
Release:        1%{?dist}
Summary:        Python module for enforcing code coverage completeness

License:        GPLv3+
URL:            http://liw.fi/%{prjname}/
Source0:        http://code.liw.fi/%{prjname}/%{pkgname}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python-coverage
Requires:       python-coverage

%description
CoverageTestRunner is a Python module for running unit tests and
failing them if the unit test module does not exercise all statements
in the module it tests.

For example, unit tests in module foo_tests.py are supposed to test
everything in the foo.py module, and if they don't, it's a bug in the
test coverage. It does not matter if other tests happen to test the
missing parts. The unit tests for the module should test everything in
that module.


%prep
%setup -q -n %{pkgname}-%{version}


%build
%{__python} setup.py build


%install
%{__python} setup.py install -O1 --skip-build --root %{buildroot}


%check
%{__python} testrun.py


%files
%doc COPYING README
%{python_sitelib}/*


%changelog
* Sun Jun  3 2012 Michel Salim <salimma@fedoraproject.org> - 1.0-1
- Initial package