From e1734d34ccdcda89fbf9e79e20b0c5e6b58f01a20f6639aa07813ce92ff79cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 13 Sep 2024 16:24:01 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-pytest-examples revision 45fda2ebce31f179300349a1910038ed --- .gitattributes | 23 ++++++++++++ pytest_examples-0.0.12.tar.gz | 3 ++ python-pytest-examples.changes | 48 ++++++++++++++++++++++++ python-pytest-examples.spec | 68 ++++++++++++++++++++++++++++++++++ 4 files changed, 142 insertions(+) create mode 100644 .gitattributes create mode 100644 pytest_examples-0.0.12.tar.gz create mode 100644 python-pytest-examples.changes create mode 100644 python-pytest-examples.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/pytest_examples-0.0.12.tar.gz b/pytest_examples-0.0.12.tar.gz new file mode 100644 index 0000000..4eed509 --- /dev/null +++ b/pytest_examples-0.0.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58da3a1d4d6b5efedbb1c0e4fc94472e44c6bb3e1e199822728d778d809c8ff7 +size 20429 diff --git a/python-pytest-examples.changes b/python-pytest-examples.changes new file mode 100644 index 0000000..e8d3fee --- /dev/null +++ b/python-pytest-examples.changes @@ -0,0 +1,48 @@ +------------------------------------------------------------------- +Wed Jul 3 16:13:14 UTC 2024 - Dirk Müller + +- 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 + +- add ruff05.patch: fix exception with ruff 0.5.0 + +------------------------------------------------------------------- +Sat Mar 9 13:16:58 UTC 2024 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Thu Mar 7 01:15:34 UTC 2024 - Steve Kowalik + +- 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 + +- 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 + +- 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 + +- initial package diff --git a/python-pytest-examples.spec b/python-pytest-examples.spec new file mode 100644 index 0000000..d7bbc65 --- /dev/null +++ b/python-pytest-examples.spec @@ -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