pytest-subprocess 1.5.1__tar.gz → 1.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/HISTORY.rst +13 -1
  2. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/MANIFEST.in +4 -0
  3. {pytest_subprocess-1.5.1/pytest_subprocess.egg-info → pytest_subprocess-1.5.2}/PKG-INFO +14 -2
  4. pytest_subprocess-1.5.2/docs/Makefile +20 -0
  5. pytest_subprocess-1.5.2/docs/api.rst +22 -0
  6. pytest_subprocess-1.5.2/docs/conf.py +69 -0
  7. pytest_subprocess-1.5.2/docs/index.rst +48 -0
  8. pytest_subprocess-1.5.2/docs/make.bat +35 -0
  9. pytest_subprocess-1.5.2/docs/usage.rst +3 -0
  10. pytest_subprocess-1.5.2/pytest.ini +5 -0
  11. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2/pytest_subprocess.egg-info}/PKG-INFO +14 -2
  12. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess.egg-info/SOURCES.txt +7 -0
  13. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess.egg-info/top_level.txt +0 -1
  14. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/setup.py +2 -3
  15. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/LICENSE +0 -0
  16. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/README.rst +0 -0
  17. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/__init__.py +0 -0
  18. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/asyncio_subprocess.py +0 -0
  19. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/exceptions.py +0 -0
  20. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/fake_popen.py +0 -0
  21. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/fake_process.py +0 -0
  22. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/fixtures.py +0 -0
  23. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/process_dispatcher.py +0 -0
  24. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/process_recorder.py +0 -0
  25. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/py.typed +0 -0
  26. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/types.py +0 -0
  27. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess/utils.py +0 -0
  28. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess.egg-info/dependency_links.txt +0 -0
  29. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess.egg-info/entry_points.txt +0 -0
  30. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/pytest_subprocess.egg-info/requires.txt +0 -0
  31. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/setup.cfg +0 -0
  32. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/tests/__init__.py +0 -0
  33. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/tests/conftest.py +0 -0
  34. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/tests/example_script.py +0 -0
  35. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/tests/test_asyncio.py +0 -0
  36. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/tests/test_examples.py +0 -0
  37. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/tests/test_subprocess.py +0 -0
  38. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/tests/test_typing.py +0 -0
  39. {pytest_subprocess-1.5.1 → pytest_subprocess-1.5.2}/tests/test_utils.py +0 -0
@@ -1,12 +1,24 @@
1
1
  History
2
2
  =======
3
3
 
4
+ 1.5.2 (2024-07-24)
5
+ ------------------
6
+
7
+ Bug fixes
8
+ ~~~~~~~~~
9
+ * `#162 <https://github.com/aklajnert/pytest-subprocess/pull/162>`_: Include tests (and docs) and sdist correctly, and stop installing them to site-packages.
10
+
11
+ Other changes
12
+ ~~~~~~~~~~~~~
13
+ * `#163 <https://github.com/aklajnert/pytest-subprocess/pull/163>`_: Add support for Python 3.12.
14
+
4
15
  1.5.1 (2024-07-23)
5
16
  ------------------
6
17
 
7
18
  Other changes
8
19
  ~~~~~~~~~~~~~
9
- * `#127 <https://github.com/aklajnert/pytest-subprocess/pull/127>`_: Add `tests` directory to sdist.
20
+ * `#160 <https://github.com/aklajnert/pytest-subprocess/pull/160>`_: Changed pytest entrypoint to avoid error while loading plugin with `-p` argument.
21
+ * `#128 <https://github.com/aklajnert/pytest-subprocess/pull/128>`_: Add `tests` directory to sdist.
10
22
 
11
23
  1.5.0 (2023-01-28)
12
24
  ------------------
@@ -1,6 +1,10 @@
1
1
  include LICENSE
2
2
  include README.rst
3
3
  include HISTORY.rst
4
+ include pytest.ini
5
+
6
+ recursive-include docs *
7
+ recursive-include tests *.py
4
8
 
5
9
  recursive-exclude * __pycache__
6
10
  recursive-exclude * *.py[co]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-subprocess
3
- Version: 1.5.1
3
+ Version: 1.5.2
4
4
  Summary: A plugin to fake subprocess for pytest
5
5
  Author: Andrzej Klajnert
6
6
  Author-email: python@aklajnert.pl
@@ -507,12 +507,24 @@ This `pytest`_ plugin was generated with `Cookiecutter`_ along with `@hackebrot`
507
507
  History
508
508
  =======
509
509
 
510
+ 1.5.2 (2024-07-24)
511
+ ------------------
512
+
513
+ Bug fixes
514
+ ~~~~~~~~~
515
+ * `#162 <https://github.com/aklajnert/pytest-subprocess/pull/162>`_: Include tests (and docs) and sdist correctly, and stop installing them to site-packages.
516
+
517
+ Other changes
518
+ ~~~~~~~~~~~~~
519
+ * `#163 <https://github.com/aklajnert/pytest-subprocess/pull/163>`_: Add support for Python 3.12.
520
+
510
521
  1.5.1 (2024-07-23)
511
522
  ------------------
512
523
 
513
524
  Other changes
514
525
  ~~~~~~~~~~~~~
515
- * `#127 <https://github.com/aklajnert/pytest-subprocess/pull/127>`_: Add `tests` directory to sdist.
526
+ * `#160 <https://github.com/aklajnert/pytest-subprocess/pull/160>`_: Changed pytest entrypoint to avoid error while loading plugin with `-p` argument.
527
+ * `#128 <https://github.com/aklajnert/pytest-subprocess/pull/128>`_: Add `tests` directory to sdist.
516
528
 
517
529
  1.5.0 (2023-01-28)
518
530
  ------------------
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,22 @@
1
+ API Reference
2
+ =============
3
+
4
+ fake_subprocess
5
+ ---------------
6
+
7
+ The main entrypoint class for all ``fake_subprocess`` operations is the
8
+ ``FakeProcess`` class. This class is instantiated and returned when the
9
+ ``fake_subprocess`` fixture is being used.
10
+
11
+ .. autoclass:: pytest_subprocess.fake_process.FakeProcess
12
+ :members:
13
+
14
+ any()
15
+ -----
16
+
17
+ For a non-exact matching, you can use the ``Any()`` class that is available to
18
+ use via ``fake_subprocess.any``. This class can be used to replace a number
19
+ of arguments that might occur,
20
+
21
+ .. autoclass:: pytest_subprocess.utils.Any
22
+ :members:
@@ -0,0 +1,69 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # This file only contains a selection of the most common options. For a full
4
+ # list see the documentation:
5
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
6
+ # -- Path setup --------------------------------------------------------------
7
+ # If extensions (or modules to document with autodoc) are in another directory,
8
+ # add these directories to sys.path here. If the directory is relative to the
9
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
10
+ #
11
+ import os
12
+ import sys
13
+
14
+ sys.path.insert(0, os.path.abspath(".."))
15
+ import datetime
16
+ from pathlib import Path
17
+
18
+ import pkg_resources
19
+ from changelogd import changelogd
20
+
21
+ ROOT_PATH = Path(__file__).parents[1]
22
+
23
+ changelogd.release(partial=True, output="history.rst", config=ROOT_PATH / "changelog.d")
24
+
25
+ # -- Project information -----------------------------------------------------
26
+
27
+ project = "pytest-subprocess"
28
+ copyright = f"2019-{datetime.datetime.now().year}, Andrzej Klajnert"
29
+ author = "Andrzej Klajnert"
30
+
31
+ # The full version, including alpha/beta/rc tags
32
+ release = pkg_resources.get_distribution("pip").version
33
+
34
+
35
+ # -- General configuration ---------------------------------------------------
36
+
37
+ # Add any Sphinx extension module names here, as strings. They can be
38
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
39
+ # ones.
40
+
41
+ extensions = [
42
+ "sphinxcontrib.napoleon",
43
+ "sphinx.ext.autodoc",
44
+ "sphinx_autodoc_typehints",
45
+ ]
46
+ typehints_fully_qualified = False
47
+ always_document_param_types = True
48
+
49
+ # Add any paths that contain templates here, relative to this directory.
50
+ templates_path = ["_templates"]
51
+
52
+ # List of patterns, relative to source directory, that match files and
53
+ # directories to ignore when looking for source files.
54
+ # This pattern also affects html_static_path and html_extra_path.
55
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
56
+
57
+
58
+ # -- Options for HTML output -------------------------------------------------
59
+
60
+ # The theme to use for HTML and HTML Help pages. See the documentation for
61
+ # a list of builtin themes.
62
+ #
63
+ html_theme = "furo"
64
+ html_title = "pytest-subprocess"
65
+
66
+ # Add any paths that contain custom static files (such as style sheets) here,
67
+ # relative to this directory. They are copied after the builtin static files,
68
+ # so a file named "default.css" will overwrite the builtin "default.css".
69
+ # html_static_path = ["_static"]
@@ -0,0 +1,48 @@
1
+ .. pytest-subprocess documentation master file, created by
2
+ sphinx-quickstart on Sat Nov 23 13:49:07 2019.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ pytest-subprocess
7
+ =================
8
+
9
+ This is a pytest plugin to fake the real subprocess behavior to make your tests more independent.
10
+
11
+ Example
12
+ -------
13
+
14
+ You can use the provided ``fake_process`` (or ``fp`` for short) fixture to
15
+ register commands and specify their behavior before they will be executed.
16
+ This will prevent a real subprocess execution.
17
+
18
+ .. code-block:: python
19
+
20
+ def test_process(fp):
21
+ fp.register(["fake-command"])
22
+ process = subprocess.run(["fake-command"])
23
+
24
+ assert process.returncode == 0
25
+
26
+
27
+ Table of contents
28
+ -----------------
29
+
30
+ .. toctree::
31
+ :maxdepth: 2
32
+
33
+ usage
34
+ api
35
+ history
36
+
37
+
38
+
39
+ Indices and tables
40
+ ==================
41
+
42
+ * :ref:`genindex`
43
+ * :ref:`modindex`
44
+ * :ref:`search`
45
+
46
+
47
+ .. _`pip`: https://pypi.org/project/pip/
48
+ .. _`PyPI`: https://pypi.org/project
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+
13
+ if "%1" == "" goto help
14
+
15
+ %SPHINXBUILD% >NUL 2>NUL
16
+ if errorlevel 9009 (
17
+ echo.
18
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19
+ echo.installed, then set the SPHINXBUILD environment variable to point
20
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
21
+ echo.may add the Sphinx directory to PATH.
22
+ echo.
23
+ echo.If you don't have Sphinx installed, grab it from
24
+ echo.http://sphinx-doc.org/
25
+ exit /b 1
26
+ )
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,3 @@
1
+ .. include:: ../README.rst
2
+ :start-after: include-start
3
+ :end-before: include-end
@@ -0,0 +1,5 @@
1
+ [pytest]
2
+ junit_family=legacy
3
+ filterwarnings =
4
+ error
5
+ ignore::pytest.PytestUnraisableExceptionWarning
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-subprocess
3
- Version: 1.5.1
3
+ Version: 1.5.2
4
4
  Summary: A plugin to fake subprocess for pytest
5
5
  Author: Andrzej Klajnert
6
6
  Author-email: python@aklajnert.pl
@@ -507,12 +507,24 @@ This `pytest`_ plugin was generated with `Cookiecutter`_ along with `@hackebrot`
507
507
  History
508
508
  =======
509
509
 
510
+ 1.5.2 (2024-07-24)
511
+ ------------------
512
+
513
+ Bug fixes
514
+ ~~~~~~~~~
515
+ * `#162 <https://github.com/aklajnert/pytest-subprocess/pull/162>`_: Include tests (and docs) and sdist correctly, and stop installing them to site-packages.
516
+
517
+ Other changes
518
+ ~~~~~~~~~~~~~
519
+ * `#163 <https://github.com/aklajnert/pytest-subprocess/pull/163>`_: Add support for Python 3.12.
520
+
510
521
  1.5.1 (2024-07-23)
511
522
  ------------------
512
523
 
513
524
  Other changes
514
525
  ~~~~~~~~~~~~~
515
- * `#127 <https://github.com/aklajnert/pytest-subprocess/pull/127>`_: Add `tests` directory to sdist.
526
+ * `#160 <https://github.com/aklajnert/pytest-subprocess/pull/160>`_: Changed pytest entrypoint to avoid error while loading plugin with `-p` argument.
527
+ * `#128 <https://github.com/aklajnert/pytest-subprocess/pull/128>`_: Add `tests` directory to sdist.
516
528
 
517
529
  1.5.0 (2023-01-28)
518
530
  ------------------
@@ -2,8 +2,15 @@ HISTORY.rst
2
2
  LICENSE
3
3
  MANIFEST.in
4
4
  README.rst
5
+ pytest.ini
5
6
  setup.cfg
6
7
  setup.py
8
+ docs/Makefile
9
+ docs/api.rst
10
+ docs/conf.py
11
+ docs/index.rst
12
+ docs/make.bat
13
+ docs/usage.rst
7
14
  pytest_subprocess/__init__.py
8
15
  pytest_subprocess/asyncio_subprocess.py
9
16
  pytest_subprocess/exceptions.py
@@ -16,7 +16,7 @@ requirements = ["pytest>=4.0.0"]
16
16
 
17
17
  setup(
18
18
  name="pytest-subprocess",
19
- version="1.5.1",
19
+ version="1.5.2",
20
20
  author="Andrzej Klajnert",
21
21
  author_email="python@aklajnert.pl",
22
22
  maintainer="Andrzej Klajnert",
@@ -29,7 +29,6 @@ setup(
29
29
  },
30
30
  description="A plugin to fake subprocess for pytest",
31
31
  long_description=read("README.rst") + "\n" + read("HISTORY.rst"),
32
- py_modules=["pytest_subprocess"],
33
32
  python_requires=">=3.6",
34
33
  install_requires=requirements,
35
34
  extras_require={
@@ -52,7 +51,7 @@ setup(
52
51
  "changelogd",
53
52
  ],
54
53
  },
55
- packages=find_packages(exclude=["docs"]),
54
+ packages=find_packages(exclude=["docs", "tests"]),
56
55
  package_data={"pytest_subprocess": ["py.typed"]},
57
56
  classifiers=[
58
57
  "Development Status :: 5 - Production/Stable",