From 0256dc4809c8ff42de17cb7acb0f646625d95dc8604605a1cf28b9e4613b42b8 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 6 Aug 2025 14:33:47 +0000 Subject: [PATCH] Required by FreeIPA OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-sourceorder?expand=0&rev=1 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + pytest-sourceorder-0.6.0.tar.gz | 3 ++ python-pytest-sourceorder.changes | 12 +++++ python-pytest-sourceorder.spec | 75 +++++++++++++++++++++++++++++++ 5 files changed, 114 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pytest-sourceorder-0.6.0.tar.gz create mode 100644 python-pytest-sourceorder.changes create mode 100644 python-pytest-sourceorder.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/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pytest-sourceorder-0.6.0.tar.gz b/pytest-sourceorder-0.6.0.tar.gz new file mode 100644 index 0000000..595327a --- /dev/null +++ b/pytest-sourceorder-0.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fd888ea08f3b13489016850c80d07742c19d6f177daf3c3b73a87f8f6a45bb1 +size 17672 diff --git a/python-pytest-sourceorder.changes b/python-pytest-sourceorder.changes new file mode 100644 index 0000000..6aed522 --- /dev/null +++ b/python-pytest-sourceorder.changes @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +Wed Sep 01 00:00:00 UTC 2021 - Petr Viktorin - 0.6.0 +Added support for decorated methods (thanks to Sergey Orlov) + +Tue Apr 11 00:00:00 UTC 2017 - Petr Viktorin - 0.5.1 +Packaging improvements only + +Tue Jan 26 00:00:00 UTC 2016 - Petr Viktorin - 0.5.0 +Added support for parametrized tests under Python 3 + +Mon Jan 26 00:00:00 UTC 2015 - Petr Viktorin - 0.4.0 +Python 3 compatibility diff --git a/python-pytest-sourceorder.spec b/python-pytest-sourceorder.spec new file mode 100644 index 0000000..9ef9322 --- /dev/null +++ b/python-pytest-sourceorder.spec @@ -0,0 +1,75 @@ +# +# spec file for package python-pytest-sourceorder +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# 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-sourceorder +Version: 0.6.0 +Release: 0 +Summary: Test-ordering plugin for pytest +License: GPL-3.0-or-later +Group: Development/Languages/Python +URL: https://pagure.io/python-pytest-sourceorder +Source: pytest-sourceorder-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module tox} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-pytest +BuildArch: noarch +%python_subpackages + +%description +Test-ordering plugin for pytest + +When installed, test classes marked @pytest_sourceorder.ordered +will have tests run in the order of their definition. + +Methods are ordered by line nuber of their definition, so +spreading them between multiple files or otherwise defining them +outside of their class might cause the plugin to order them +wrong. + +When inheriting from an ordered test class, the superclass’ +methods will be run first (even if overridden), followed by the +ones from subclasses. You generally do not want to apply an +additional @ordered decorator to the subclasses – doing so will +reset the inheritance-based ordering. + +%prep +%autosetup -p1 -n pytest-sourceorder-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%files %{python_files} +%doc CHANGELOG.rst README.rst +%license COPYING +%{python_sitelib}/pytest_sourceorder.py +%{python_sitelib}/pytest_sourceorder-%{version}.dist-info +%pycache_only %{python_sitelib}/__pycache__ + +%changelog