[python-dingus] Initial import #804980

Bohuslav Kabrda bkabrda at fedoraproject.org
Fri Mar 23 13:01:02 UTC 2012


commit a7d700257dbf7510f66de19d2e2c544c30529f7e
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Fri Mar 23 14:00:55 2012 +0100

    Initial import #804980

 .gitignore         |    2 +
 python-dingus.spec |   53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources            |    2 +
 3 files changed, 57 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..7025b80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/dingus-0.3.4.tar.gz
+/dingus-tests-0.3.4.tgz
diff --git a/python-dingus.spec b/python-dingus.spec
new file mode 100644
index 0000000..50398c1
--- /dev/null
+++ b/python-dingus.spec
@@ -0,0 +1,53 @@
+%global pypi_name dingus
+
+Name:           python-%{pypi_name}
+Version:        0.3.4
+Release:        1%{?dist}
+Summary:        A record-then-assert mocking library
+
+License:        MIT
+URL:            https://github.com/garybernhardt/dingus
+Source0:        http://pypi.python.org/packages/source/d/dingus/dingus-0.3.4.tar.gz
+# to get tests:
+# git clone https://github.com/garybernhardt/dingus.git && cd dingus
+# git checkout 0.3.4
+# tar -czf dingus-tests-0.3.4.tgz tests/
+Source1:        dingus-tests-%{version}.tgz
+
+BuildArch:      noarch
+BuildRequires:  python-devel
+BuildRequires:  python-setuptools
+BuildRequires:  python-nose
+
+%description
+A dingus is sort of like a mock object. The main difference is that you don't
+set up expectations ahead of time. You just run your code, using a dingus in
+place of another object or class, and it will record what happens to it.
+Then, once your code has been exercised, you can make assertions about
+what it did to the dingus.
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+# remove bundled egg-info
+rm -rf dingus.egg-info
+
+%build
+%{__python} setup.py build
+
+
+%install
+%{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-data %{_docdir}/%{pypi_name}
+
+%check
+tar -xzf %{SOURCE1}
+nosetests -m '((?:^|[b_.-])(:?[Tt]est|When|should))'
+
+
+%files
+%doc %{_docdir}/%{pypi_name}/
+%{python_sitelib}/*
+
+%changelog
+* Tue Mar 20 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 0.3.4-1
+- Initial package.
+
diff --git a/sources b/sources
index e69de29..8f0c5fd 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+5c26a789dcd054bf140985759865749e  dingus-0.3.4.tar.gz
+6b1ce09dc9cac9f5c9a1f4c02628fb97  dingus-tests-0.3.4.tgz


More information about the scm-commits mailing list