Sync from SUSE:SLFO:Main python-pytest-examples revision 45fda2ebce31f179300349a1910038ed

This commit is contained in:
Adrian Schröter 2024-09-13 16:24:01 +02:00
commit e1734d34cc
4 changed files with 142 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
pytest_examples-0.0.12.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,48 @@
-------------------------------------------------------------------
Wed Jul 3 16:13:14 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 0.0.12:
* Pin `ruff` version and prep for v0.0.12 release
- update to 0.0.11:
* Use `tb_lineno` to point to correct line in traceback
* Fix deprecation warnings in Python 3.12
* Include tests in sdist
* `ruff` now requires the `check` specification
- drop ruff05.patch, fix-traceback.patch,
support-python-312.patch, test-ruff-0.1.0.patch: upstream
-------------------------------------------------------------------
Mon Jul 1 18:03:28 UTC 2024 - Dirk Müller <dmueller@suse.com>
- add ruff05.patch: fix exception with ruff 0.5.0
-------------------------------------------------------------------
Sat Mar 9 13:16:58 UTC 2024 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Thu Mar 7 01:15:34 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Drop patch suppot-python-312.patch.
- Add patch support-python-312.patch, which is a rename of the previous
patch.
- Add patch fix-traceback.patch, support traceback changes of
Python 3.12.
-------------------------------------------------------------------
Wed Jan 24 06:44:56 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch suppot-python-312.patch:
* Support code changes in Python 3.12+.
-------------------------------------------------------------------
Thu Oct 19 16:35:18 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>
- add test-ruff-0.1.0.patch to fix tests with ruvv-0.1.0
-------------------------------------------------------------------
Mon Oct 16 13:59:40 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>
- initial package

View File

@ -0,0 +1,68 @@
#
# spec file for package python-pytest-examples
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-pytest-examples
Version: 0.0.12
Release: 0
Summary: Pytest plugin for testing examples in docstrings and markdown files
License: MIT
URL: https://github.com/pydantic/pytest-examples
# sdist without tests
Source: https://files.pythonhosted.org/packages/source/p/pytest-examples/pytest_examples-%{version}.tar.gz
BuildRequires: %{python_module black}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module ruff}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-black
Requires: python-pytest
Requires: python-ruff
BuildArch: noarch
%python_subpackages
%description
Pytest plugin for testing Python code examples in docstrings and markdown files.
`pytest-examples` can:
* lint code examples using `ruff` and `black`
* run code examples
* run code examples and check print statements are inlined correctly in the code
It can also update code examples in place to format them and insert or update print statements.
%prep
%autosetup -p1 -n pytest_examples-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%{python_sitelib}/pytest_examples
%{python_sitelib}/pytest_examples-%{version}.dist-info
%changelog