commit e2d02ff05f24df74a690ebf619b976ea7e63b50f1d04a4af075f14db36a0518d Author: Ondřej Súkup Date: Mon Oct 16 15:08:07 2023 +0000 Accepting request 1118060 from home:mimi_vx pytest-examples, by pydantic and new dep of dirty-equals OBS-URL: https://build.opensuse.org/request/show/1118060 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-examples?expand=0&rev=1 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/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pytest-examples-0.0.10.tar.gz b/pytest-examples-0.0.10.tar.gz new file mode 100644 index 0000000..8719b21 --- /dev/null +++ b/pytest-examples-0.0.10.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dce3ca92ef6ac225387e9e38cac45cf81776f01a7b69fbacff4012b62984611f +size 22058 diff --git a/python-pytest-examples.spec b/python-pytest-examples.spec new file mode 100644 index 0000000..722106e --- /dev/null +++ b/python-pytest-examples.spec @@ -0,0 +1,67 @@ +# +# spec file for package python-pytest-examples +# +# Copyright (c) 2023 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/ +# + + +Name: python-pytest-examples +Version: 0.0.10 +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://github.com/pydantic/pytest-examples/archive/refs/tags/v%{version}.tar.gz#/pytest-examples-%{version}.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{python_module pip} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module ruff} +BuildRequires: %{python_module black} +BuildRequires: fdupes +Requires: python-pytest +Requires: python-ruff +Requires: python-black +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} + +%files %{python_files} +%{python_sitelib}/pytest_examples +%{python_sitelib}/pytest_examples-%{version}.dist-info + +%check +%pytest + +%changelog