summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 16:51:42 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 16:51:42 +0000
commit06123deb59fd9acabdfd31f2f232944cd8f65fe7 (patch)
treeccac9dd75c19b8f348d17a7889b108921f6325dc
parent6859657956bc556e358e925ec3f2fa76fbc00bfd (diff)
automatic import of python-pytest-parallel
-rw-r--r--.gitignore1
-rw-r--r--python-pytest-parallel.spec278
-rw-r--r--sources1
3 files changed, 280 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..deef9e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pytest-parallel-0.1.1.tar.gz
diff --git a/python-pytest-parallel.spec b/python-pytest-parallel.spec
new file mode 100644
index 0000000..ded55f6
--- /dev/null
+++ b/python-pytest-parallel.spec
@@ -0,0 +1,278 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pytest-parallel
+Version: 0.1.1
+Release: 1
+Summary: a pytest plugin for parallel and concurrent testing
+License: MIT
+URL: https://github.com/browsertron/pytest-parallel
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ed/0e/a74218b99ae0fbab09fabc0ad01e763b32abbeaa96a27188782e9d6289db/pytest-parallel-0.1.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-pytest
+Requires: python3-tblib
+
+%description
+# pytest-parallel
+a pytest plugin for parallel and concurrent testing
+
+## What?
+
+This plugin makes it possible to run tests quickly using multiprocessing (parallelism) and multithreading (concurrency).
+
+## Why?
+
+`pytest-xdist` is great to run tests that:
+ 1. aren't threadsafe
+ 2. perform poorly when multithreaded
+ 3. need state isolation
+
+`pytest-parallel` is better for some use cases (like Selenium tests) that:
+ 1. can be threadsafe
+ 2. can use non-blocking IO for http requests to make it performant
+ 3. manage little or no state in the Python environment
+
+Put simply, `pytest-xdist` does parallelism while `pytest-parallel` does parallelism and concurrency.
+
+## Requirements
+
+* Python3 version [3.6+]
+* Unix or Mac for `--workers`
+* Unix, Mac, or Windows for `--tests-per-worker`
+
+## Installation
+
+`pip install pytest-parallel`
+
+## Options
+
+* `workers` (optional) - max workers (aka processes) to start. Can be a **positive integer or `auto`** which uses one worker per core. **Defaults to 1**.
+* `tests-per-worker` (optional) - max concurrent tests per worker. Can be a **positive integer or `auto`** which evenly divides tests among the workers up to 50 concurrent tests. **Defaults to 1**.
+
+## Examples
+
+```bash
+# runs 2 workers with 1 test per worker at a time
+pytest --workers 2
+
+# runs 4 workers (assuming a quad-core machine) with 1 test per worker
+pytest --workers auto
+
+# runs 1 worker with 4 tests at a time
+pytest --tests-per-worker 4
+
+# runs 1 worker with up to 50 tests at a time
+pytest --tests-per-worker auto
+
+# runs 2 workers with up to 50 tests per worker
+pytest --workers 2 --tests-per-worker auto
+```
+
+## Notice
+
+Beginning with Python 3.8, forking behavior is forced on macOS at the expense of safety.
+
+ Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See bpo-33725.
+
+[Source](https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods)
+
+## License
+
+MIT
+
+
+
+
+%package -n python3-pytest-parallel
+Summary: a pytest plugin for parallel and concurrent testing
+Provides: python-pytest-parallel
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pytest-parallel
+# pytest-parallel
+a pytest plugin for parallel and concurrent testing
+
+## What?
+
+This plugin makes it possible to run tests quickly using multiprocessing (parallelism) and multithreading (concurrency).
+
+## Why?
+
+`pytest-xdist` is great to run tests that:
+ 1. aren't threadsafe
+ 2. perform poorly when multithreaded
+ 3. need state isolation
+
+`pytest-parallel` is better for some use cases (like Selenium tests) that:
+ 1. can be threadsafe
+ 2. can use non-blocking IO for http requests to make it performant
+ 3. manage little or no state in the Python environment
+
+Put simply, `pytest-xdist` does parallelism while `pytest-parallel` does parallelism and concurrency.
+
+## Requirements
+
+* Python3 version [3.6+]
+* Unix or Mac for `--workers`
+* Unix, Mac, or Windows for `--tests-per-worker`
+
+## Installation
+
+`pip install pytest-parallel`
+
+## Options
+
+* `workers` (optional) - max workers (aka processes) to start. Can be a **positive integer or `auto`** which uses one worker per core. **Defaults to 1**.
+* `tests-per-worker` (optional) - max concurrent tests per worker. Can be a **positive integer or `auto`** which evenly divides tests among the workers up to 50 concurrent tests. **Defaults to 1**.
+
+## Examples
+
+```bash
+# runs 2 workers with 1 test per worker at a time
+pytest --workers 2
+
+# runs 4 workers (assuming a quad-core machine) with 1 test per worker
+pytest --workers auto
+
+# runs 1 worker with 4 tests at a time
+pytest --tests-per-worker 4
+
+# runs 1 worker with up to 50 tests at a time
+pytest --tests-per-worker auto
+
+# runs 2 workers with up to 50 tests per worker
+pytest --workers 2 --tests-per-worker auto
+```
+
+## Notice
+
+Beginning with Python 3.8, forking behavior is forced on macOS at the expense of safety.
+
+ Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See bpo-33725.
+
+[Source](https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods)
+
+## License
+
+MIT
+
+
+
+
+%package help
+Summary: Development documents and examples for pytest-parallel
+Provides: python3-pytest-parallel-doc
+%description help
+# pytest-parallel
+a pytest plugin for parallel and concurrent testing
+
+## What?
+
+This plugin makes it possible to run tests quickly using multiprocessing (parallelism) and multithreading (concurrency).
+
+## Why?
+
+`pytest-xdist` is great to run tests that:
+ 1. aren't threadsafe
+ 2. perform poorly when multithreaded
+ 3. need state isolation
+
+`pytest-parallel` is better for some use cases (like Selenium tests) that:
+ 1. can be threadsafe
+ 2. can use non-blocking IO for http requests to make it performant
+ 3. manage little or no state in the Python environment
+
+Put simply, `pytest-xdist` does parallelism while `pytest-parallel` does parallelism and concurrency.
+
+## Requirements
+
+* Python3 version [3.6+]
+* Unix or Mac for `--workers`
+* Unix, Mac, or Windows for `--tests-per-worker`
+
+## Installation
+
+`pip install pytest-parallel`
+
+## Options
+
+* `workers` (optional) - max workers (aka processes) to start. Can be a **positive integer or `auto`** which uses one worker per core. **Defaults to 1**.
+* `tests-per-worker` (optional) - max concurrent tests per worker. Can be a **positive integer or `auto`** which evenly divides tests among the workers up to 50 concurrent tests. **Defaults to 1**.
+
+## Examples
+
+```bash
+# runs 2 workers with 1 test per worker at a time
+pytest --workers 2
+
+# runs 4 workers (assuming a quad-core machine) with 1 test per worker
+pytest --workers auto
+
+# runs 1 worker with 4 tests at a time
+pytest --tests-per-worker 4
+
+# runs 1 worker with up to 50 tests at a time
+pytest --tests-per-worker auto
+
+# runs 2 workers with up to 50 tests per worker
+pytest --workers 2 --tests-per-worker auto
+```
+
+## Notice
+
+Beginning with Python 3.8, forking behavior is forced on macOS at the expense of safety.
+
+ Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See bpo-33725.
+
+[Source](https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods)
+
+## License
+
+MIT
+
+
+
+
+%prep
+%autosetup -n pytest-parallel-0.1.1
+
+%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-parallel -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..5500c0c
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+8779d17a8da9cdb45145a8ca27a7db5d pytest-parallel-0.1.1.tar.gz