[python-webassets/epel7] run unit tests in %check
Dan Callaghan
dcallagh at fedoraproject.org
Wed Dec 17 02:01:37 UTC 2014
commit b39b68133c4bfd142652ddd1499e6d52114b7aae
Author: Dan Callaghan <dcallagh at redhat.com>
Date: Wed Dec 17 12:01:08 2014 +1000
run unit tests in %check
python-webassets.spec | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/python-webassets.spec b/python-webassets.spec
index 203ae3d..85ba840 100644
--- a/python-webassets.spec
+++ b/python-webassets.spec
@@ -35,10 +35,35 @@ BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires: python-setuptools
+# test requirements
+BuildRequires: python-nose
+BuildRequires: python-mock
+# v8 is just for jsmin.py
+BuildRequires: v8
+# skipping pyscss tests for now since 1.2+ is intentionally not supported
+#BuildRequires: python-scss
+%if !0%{?epel}
+BuildRequires: /usr/bin/sass
+BuildRequires: /usr/bin/compass
+BuildRequires: python-cssutils
+BuildRequires: python-slimit
+%endif
+BuildRequires: python-cssmin
+BuildRequires: /usr/bin/uglifyjs
+BuildRequires: /usr/bin/lessc
+BuildRequires: /usr/bin/coffee
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: python3-setuptools
+# test requirements
+BuildRequires: python3-nose
+BuildRequires: python3-mock
+# these are not ported to Python 3 yet
+#BuildRequires: python3-slimit
+#BuildRequires: python3-cssutils
+#BuildRequires: python3-scss
+#BuildRequires: python3-cssmin
%endif
@@ -96,6 +121,16 @@ pushd %{py3dir}
popd
%endif
+%check
+export LC_ALL=en_US.utf8
+nosetests
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+nosetests-%{python3_version}
+popd
+%endif
+
%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
sed -i -e '/^#!\//, 1d' $RPM_BUILD_ROOT%{python_sitelib}/%{mod_name}/filter/rjsmin/rjsmin.py
@@ -125,6 +160,7 @@ popd
* Wed Dec 17 2014 Dan Callaghan <dcallagh at redhat.com> - 0.9-5
- updated patches to match upstream commits merged in 0.10
- backported some more API-compatible fixes and enhancements from 0.10
+- unit tests are run in %%check
* Mon Nov 10 2014 Dan Callaghan <dcallagh at redhat.com> - 0.9-4
- RHBZ#1142524 escape backslashes in string literals in JST filter
More information about the scm-commits
mailing list