summaryrefslogtreecommitdiff
path: root/python-pytest-mocha.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 06:38:27 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 06:38:27 +0000
commit2caaf2d4d6ac451a4fe4d0eb1201fae8be5dddcc (patch)
tree2eb08de93d1d49c64e31738ff00693b358ba3e25 /python-pytest-mocha.spec
parenta878b306534ea2647a64b175f51415b45b4eb7e5 (diff)
automatic import of python-pytest-mocha
Diffstat (limited to 'python-pytest-mocha.spec')
-rw-r--r--python-pytest-mocha.spec197
1 files changed, 197 insertions, 0 deletions
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