forked from pool/python-nose2
- Rip out the requirement of the wheel.whl, recent setuptools no longer
require it. - Add patch support-python314.patch: * Support Python 3.14 multiprocessing and argparse changes. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-nose2?expand=0&rev=39
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
BIN
nose2-0.15.1.tar.gz
LFS
Normal file
BIN
nose2-0.15.1.tar.gz
LFS
Normal file
Binary file not shown.
241
python-nose2.changes
Normal file
241
python-nose2.changes
Normal file
@@ -0,0 +1,241 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 4 01:46:07 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Rip out the requirement of the wheel.whl, recent setuptools no longer
|
||||
require it.
|
||||
- Add patch support-python314.patch:
|
||||
* Support Python 3.14 multiprocessing and argparse changes.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 21 10:02:03 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Convert to libalternatives on SLE-16-based and newer systems only
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 16 13:04:55 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Convert to libalternatives
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 4 20:42:07 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.15.1:
|
||||
* Fix a bug with config loading which caused custom ini configs
|
||||
not to load if they were not named with a .cfg extension.
|
||||
Thanks :user:`grhwalls` for the bug report!
|
||||
* Official support for python3.13 betas. nose2 now tests itself
|
||||
against Python 3.13.
|
||||
* Official support for python3.13 betas. nose2 now tests itself
|
||||
against Python 3.13.
|
||||
* nose2 now supports loading configuration data from the
|
||||
tool.nose2 table in pyproject.toml. Thanks to :user:`qequ`
|
||||
for the PR! (:pr:`596`, :pr:`606`) On python 3.11+, tomllib
|
||||
is used to parse TOML data. On python 3.10 and lower, tomli
|
||||
must be installed to enable TOML support. Simply pip install
|
||||
tomli as necessary.
|
||||
* nose2 now supports loading configuration data from the
|
||||
tool.nose2 table in pyproject.toml. Thanks to :user:`qequ`
|
||||
for the PR! (:pr:`596`, :pr:`606`)
|
||||
* On python 3.11+, tomllib is used to parse TOML data. On
|
||||
python 3.10 and lower, tomli must be installed to enable TOML
|
||||
support. Simply pip install tomli as necessary.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 7 20:14:19 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.14.2:
|
||||
* For the coverage plugin, add a config option, coverage-
|
||||
combine, which defaults to False. When set, this config
|
||||
invokes a coverage combine step before reporting results,
|
||||
regardless of whether or not multiprocessing was used to run
|
||||
tests. This allows reporting of coverage results via the
|
||||
plugin on testsuites which invoke subprocesses.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 9 21:43:46 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.14.1:
|
||||
* Fix the reporting of skipped tests in verbose mode on newer
|
||||
pythons (3.12.1+), in which a skipped test is no longer
|
||||
treated as "started". nose2 will not introduce a
|
||||
StartTestEvent in such cases -- the fix is narrowly and
|
||||
adjustment to the test reporter.
|
||||
* Fix the reporting of skipped tests in verbose mode on newer
|
||||
pythons (3.12.1+), in which a skipped test is no longer
|
||||
treated as "started".
|
||||
* nose2 will not introduce a StartTestEvent in such cases --
|
||||
the fix is narrowly and adjustment to the test reporter.
|
||||
- drop support-python312.patch (upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 8 05:39:22 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 0.14.0;
|
||||
* Add official support for python3.12
|
||||
* Remove support for python3.6 and python3.7
|
||||
* Remove support for python2 and older python3 versions
|
||||
* Fix support for python3.12 to avoid warnings about addDuration.
|
||||
* nose2 package metadata is converted to pyproject.toml format, using
|
||||
setuptools.
|
||||
* nose2 license metadata has been corrected in format and content to be
|
||||
distributed in the sdist and wheel distributions correctly.
|
||||
- Add patch support-python312.patch:
|
||||
* Support changes made upstream in Python 3.12.1.
|
||||
- Switch to autosetup macro.
|
||||
- Instruct pip it isn't allowed to reach PyPi and teach it where to look for
|
||||
wheels.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:28:30 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 13 22:42:43 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Make calling of %{sle15modernpython} optional.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 20 11:46:12 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 0.12.0
|
||||
* Note: The 0.12.x series will be the final releases of nose2
|
||||
which support Python 2.
|
||||
* Passing --junit-xml-path now implies --junit-xml when using the
|
||||
junitxml plugin. This means that the --junit-xml flag can be
|
||||
omitted when --junit-xml-path is specified. (:issue:`521`)
|
||||
* Remove the dependency on coverage. Use of the coverage plugin
|
||||
now requires that you either install coverage independently, or
|
||||
use the extra, nose2[coverage_plugin]. As a result, nose2 no
|
||||
longer has any strict dependencies
|
||||
* Remove the dependency on six, instead using a vendored copy.
|
||||
This ensures that the dependency for nose2 doesn't conflict
|
||||
with application dependencies
|
||||
* nose2 no longer provides an entry-point named based on the
|
||||
current python version, e.g. nose2-3.8 on python3.8 . Only the
|
||||
nose2 command is provided.
|
||||
* Remove support for setup.py test on nose2 itself. This usage is
|
||||
deprecated by setuptools. Developers contributing to nose2 are
|
||||
encouraged to use tox to run nose2's testsuite, per the
|
||||
contributing guide.
|
||||
- Release 0.11.0
|
||||
* Test classes now have their short description (first line of
|
||||
docstring) printed in verbose output
|
||||
* The junitxml plugin now sets timestamp on each testcase node as
|
||||
an ISO-8601 timestamp. Thanks to :user:`deeplow` for the
|
||||
contribution!
|
||||
* Drop support for Python 3.5
|
||||
* Python 3.10 is now officially supported. Python 3.11-dev will
|
||||
be supported on a best-effort basis. Thanks to :user:`hugovk`
|
||||
and :user:`tirkarthi` for their contributions!
|
||||
* Add support for test classes when running with the
|
||||
multiprocessing plugin. Thanks to :user:`ltfish` for the
|
||||
initial contribution and :user:`stefanholek` for the refinement
|
||||
to this change!
|
||||
- Release 0.10.0
|
||||
* Support for subtests!
|
||||
* Notes for plugin authors about subtest support:
|
||||
- Subtest failures will produce a TestOutcomeEvent with outcome
|
||||
= "subtest"
|
||||
- Subtest events can be failures, but they do not indicate
|
||||
success -- the containing test will send a success event if
|
||||
no subtests fail
|
||||
* Drop support for Python 3.4
|
||||
* Python 3.8 and 3.9 are now officially supported
|
||||
* Improve helptext for the multiprocess plugin's -N option
|
||||
* When run with reduced verbosity (e.g. with -q), nose2 will no
|
||||
longer print an empty line before test reports
|
||||
* The plugin registry will no longer contain duplicate plugins
|
||||
and or base event.Plugin instances
|
||||
* Fix function test case implementation of id, __str__, and
|
||||
__repr__. This removes the injected transplant_class.<locals>
|
||||
from reporting output
|
||||
* Doctest loading will now skip setup.py files in the project
|
||||
root
|
||||
* Class methods decorated (e.g. with mock.patch) are no longer
|
||||
incorrectly picked up by the function loader
|
||||
- Drop patches
|
||||
* remove_unittest2.patch
|
||||
* ignore-warnings-doctests.patch
|
||||
* fix-mock-dep.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 4 11:04:22 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
- python-mock is not required for build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 7 14:35:00 UTC 2021 - pgajdos@suse.com
|
||||
|
||||
- %check: use %pyunittest rpm macro
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 2 13:22:27 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 0.9.2:
|
||||
* Add --junit-xml-path to the junit plugin argument list
|
||||
* It is now possible to use the multiprocess and coverage plugins together, as long as all of the coverage config is put into the config file
|
||||
* Minor changes to be compatible with newer pythons (3.8, 3.9)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 03:25:06 UTC 2019 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add ignore-warnings-doctests.patch to supress warnings when running
|
||||
doctests.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 30 13:20:05 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Add dep on coverage as it is hard requirement based on requires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 14 17:02:07 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Add patch to fix build with new mock versions:
|
||||
* fix-mock-dep.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 8 11:19:14 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- update to 0.9.1
|
||||
- refresh remove_unittest2.patch
|
||||
* the prof plugin now uses cProfile instead of hotshot for profiling
|
||||
* skipped tests now include the user's reason in junit XML's message field
|
||||
* the prettyassert plugin mishandled multi-line function definitions
|
||||
* Using a plugin's CLI flag when the plugin is already enabled via config
|
||||
no longer errors
|
||||
* nose2.plugins.prettyassert, enabled with --pretty-assert
|
||||
* Cleanup code for EOLed python versions
|
||||
* Dropped support for distutils.
|
||||
* Result reporter respects failure status set by other plugins
|
||||
* JUnit XML plugin now includes the skip reason in its output
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 16 10:22:15 UTC 2018 - jengelh@inai.de
|
||||
|
||||
- Avoid name repetition in summary (rpmlint).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 13 12:13:57 UTC 2018 - mcepl@suse.com
|
||||
|
||||
- Remove dependency on unittest2
|
||||
Add remove_unittest2.patch to faciliate that
|
||||
- Upgrade to 0.8.0:
|
||||
List of changes is too long to show here, see
|
||||
https://github.com/nose-devs/nose2/blob/master/docs/changelog.rst
|
||||
changes between 0.6.5 and 0.8.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 28 06:07:30 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- Update package description
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 24 09:10:11 UTC 2017 - alarrosa@suse.com
|
||||
|
||||
- Use singlespec macros
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 6 17:07:51 UTC 2017 - alarrosa@suse.com
|
||||
|
||||
- Initial release
|
||||
95
python-nose2.spec
Normal file
95
python-nose2.spec
Normal file
@@ -0,0 +1,95 @@
|
||||
#
|
||||
# spec file for package python-nose2
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-nose2
|
||||
Version: 0.15.1
|
||||
Release: 0
|
||||
Summary: The successor to the Python testing framework nose, based on unittest
|
||||
License: BSD-2-Clause AND Python-2.0
|
||||
URL: https://github.com/nose-devs/nose2
|
||||
Source: https://files.pythonhosted.org/packages/source/n/nose2/nose2-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE Support Python 3.14 multiprocessing and argparse changes
|
||||
Patch0: support-python314.patch
|
||||
BuildRequires: %{python_module coverage}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools-wheel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Suggests: python-coverage
|
||||
BuildArch: noarch
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
nose2 is the successor to nose. It's unittest with plugins.
|
||||
nose2 is a new project and does not support all of the behaviors of nose.
|
||||
nose2's purpose is to extend unittest to make testing nicer and easier to understand.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n nose2-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
# -I : work around boo#1201041
|
||||
%pyproject_install -I
|
||||
%python_clone -a %{buildroot}%{_bindir}/nose2
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
export LC_CTYPE=C.UTF8
|
||||
%{python_expand # nose must test itself in an editable install
|
||||
$python -m venv editable-%{$python_bin_suffix} --system-site-packages
|
||||
. editable-%{$python_bin_suffix}/bin/activate
|
||||
pip install --no-index --find-links %{_prefix}/lib/python%{$python_bin_suffix}/wheels -e .
|
||||
nose2 -v --pretty-assert
|
||||
deactivate
|
||||
}
|
||||
|
||||
%post
|
||||
%python_install_alternative nose2
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative nose2
|
||||
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative nose2
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc AUTHORS README.rst
|
||||
%python_alternative %{_bindir}/nose2
|
||||
%{python_sitelib}/nose2
|
||||
%{python_sitelib}/nose2-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
43
support-python314.patch
Normal file
43
support-python314.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
Index: nose2-0.15.1/nose2/plugins/mp.py
|
||||
===================================================================
|
||||
--- nose2-0.15.1.orig/nose2/plugins/mp.py
|
||||
+++ nose2-0.15.1/nose2/plugins/mp.py
|
||||
@@ -1,7 +1,9 @@
|
||||
+import contextlib
|
||||
import logging
|
||||
import multiprocessing
|
||||
import multiprocessing.connection as connection
|
||||
import os
|
||||
+import platform
|
||||
import select
|
||||
import sys
|
||||
import unittest
|
||||
@@ -28,6 +30,11 @@ class MultiProcess(events.Plugin):
|
||||
|
||||
self.cases = {}
|
||||
|
||||
+ # This requires the broken 'fork' start method to share state.
|
||||
+ if sys.version_info[:2] >= (3, 14) and platform.system() == "Linux":
|
||||
+ with contextlib.suppress(RuntimeError):
|
||||
+ multiprocessing.set_start_method('fork')
|
||||
+
|
||||
@property
|
||||
def procs(self):
|
||||
"""Get the appropriate number of procs for self.procs if self._procs is
|
||||
Index: nose2-0.15.1/nose2/tests/unit/test_plugin_api.py
|
||||
===================================================================
|
||||
--- nose2-0.15.1.orig/nose2/tests/unit/test_plugin_api.py
|
||||
+++ nose2-0.15.1/nose2/tests/unit/test_plugin_api.py
|
||||
@@ -17,9 +17,9 @@ class TestPluginApi(TestCase):
|
||||
|
||||
def test_add_option_adds_option(self):
|
||||
helpt = self.session.argparse.format_help()
|
||||
- assert "-X, --xxx" in helpt, (
|
||||
- "commandLineSwitch arg not found in help text: %s" % helpt
|
||||
- )
|
||||
+ # Output may be colored
|
||||
+ assert "-X" in helpt
|
||||
+ assert "--xxx" in helpt
|
||||
|
||||
def test_short_opt_registers_plugin(self):
|
||||
args, argv = self.session.argparse.parse_known_args(["-X"])
|
||||
BIN
wheel-0.42.0-py3-none-any.whl
LFS
Normal file
BIN
wheel-0.42.0-py3-none-any.whl
LFS
Normal file
Binary file not shown.
Reference in New Issue
Block a user