summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-pytest-mocha.spec197
-rw-r--r--sources1
3 files changed, 199 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..5141b45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pytest-mocha-0.4.0.tar.gz
diff --git a/python-pytest-mocha.spec b/python-pytest-mocha.spec
new file mode 100644
index 0000000..028df0c
--- /dev/null
+++ b/python-pytest-mocha.spec
@@ -0,0 +1,197 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pytest-mocha
+Version: 0.4.0
+Release: 1
+Summary: pytest plugin to display test execution output like a mochajs
+License: MIT
+URL: https://github.com/rudineirk/pytest-mocha
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/54/16/97027c245c509231e71c3e30ce656f4c71042ddbb4ce09692619edd0fac8/pytest-mocha-0.4.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-colorama
+Requires: python3-pytest
+
+%description
+# pytest-mocha
+
+Pytest output in [MochaJS](http://mochajs.org) format
+
+![pytest-mocha](https://cloud.githubusercontent.com/assets/5260987/26183565/eaa21f8e-3b55-11e7-8c9e-bdf1613d3903.png)
+
+It uses docstrigs as a tool to create the sections that mocha creates using the `describe` and `it` structure. Example:
+
+```python
+# file examples/test_example.py
+def test_case():
+ '''Section :: subsection :: Should execute test'''
+ pass
+```
+
+outputs this:
+
+```
+Section :: examples/test_example.py
+ subsection
+ ✓ Should execute test
+```
+
+## Install
+
+```
+pip install pytest-mocha
+```
+
+## Use
+
+```
+pytest --mocha
+```
+
+## Args
+
+* `--mocha`: Enable mocha as pytest reporter
+* `--mocha-force-disable`: Disable mocha reporter even if enabled with `--mocha` flag
+
+
+
+
+%package -n python3-pytest-mocha
+Summary: pytest plugin to display test execution output like a mochajs
+Provides: python-pytest-mocha
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pytest-mocha
+# pytest-mocha
+
+Pytest output in [MochaJS](http://mochajs.org) format
+
+![pytest-mocha](https://cloud.githubusercontent.com/assets/5260987/26183565/eaa21f8e-3b55-11e7-8c9e-bdf1613d3903.png)
+
+It uses docstrigs as a tool to create the sections that mocha creates using the `describe` and `it` structure. Example:
+
+```python
+# file examples/test_example.py
+def test_case():
+ '''Section :: subsection :: Should execute test'''
+ pass
+```
+
+outputs this:
+
+```
+Section :: examples/test_example.py
+ subsection
+ ✓ Should execute test
+```
+
+## Install
+
+```
+pip install pytest-mocha
+```
+
+## Use
+
+```
+pytest --mocha
+```
+
+## Args
+
+* `--mocha`: Enable mocha as pytest reporter
+* `--mocha-force-disable`: Disable mocha reporter even if enabled with `--mocha` flag
+
+
+
+
+%package help
+Summary: Development documents and examples for pytest-mocha
+Provides: python3-pytest-mocha-doc
+%description help
+# pytest-mocha
+
+Pytest output in [MochaJS](http://mochajs.org) format
+
+![pytest-mocha](https://cloud.githubusercontent.com/assets/5260987/26183565/eaa21f8e-3b55-11e7-8c9e-bdf1613d3903.png)
+
+It uses docstrigs as a tool to create the sections that mocha creates using the `describe` and `it` structure. Example:
+
+```python
+# file examples/test_example.py
+def test_case():
+ '''Section :: subsection :: Should execute test'''
+ pass
+```
+
+outputs this:
+
+```
+Section :: examples/test_example.py
+ subsection
+ ✓ Should execute test
+```
+
+## Install
+
+```
+pip install pytest-mocha
+```
+
+## Use
+
+```
+pytest --mocha
+```
+
+## Args
+
+* `--mocha`: Enable mocha as pytest reporter
+* `--mocha-force-disable`: Disable mocha reporter even if enabled with `--mocha` flag
+
+
+
+
+%prep
+%autosetup -n pytest-mocha-0.4.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-pytest-mocha -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..5be591d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+2c6dec86ef4afa9d3ea72515ad2023d6 pytest-mocha-0.4.0.tar.gz