9 Commits

Author SHA256 Message Date
d23758ec0f Accepting request 1308063 from devel:languages:python:pytest
- update to 4.0.1:
  * Remove the random state caching, which would grow without
    bound, leaking memory in long test runs. The caching was
    added to slightly speed up re-using the same (final) seed,
    but since the final seed is now different for each test, it
    has no effect. PR #690.
  * Modify Numpy seed restriction, replacing hashing with a
    modulo operation. The extra work to hash is unnecessary now
    that we generate a final seed per test with CRC32. This
    change saves ~500ns per test when Numpy is installed. PR
    #691.
  * Support Python 3.14.
  * Use a different random seed per test, based on the test ID.
    This change should mean that tests exercise more random data
    values in a given run, and that any randomly-generated
    identifiers have a lower chance of collision when stored in a
    shared resource like a database. PR #687. Thanks to Bryce
    Drennan for the suggestion in Issue #600 and initial
    implementation in PR #617.
  * Move from MD5 to CRC32 for hashing test IDs, as it’s 5x
    faster and we don’t need cryptographic security. Issue #686.

OBS-URL: https://build.opensuse.org/request/show/1308063
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-randomly?expand=0&rev=19
2025-09-30 15:41:44 +00:00
51bce7483e - update to 4.0.1:
* Remove the random state caching, which would grow without
    bound, leaking memory in long test runs. The caching was
    added to slightly speed up re-using the same (final) seed,
    but since the final seed is now different for each test, it
    has no effect. PR #690.
  * Modify Numpy seed restriction, replacing hashing with a
    modulo operation. The extra work to hash is unnecessary now
    that we generate a final seed per test with CRC32. This
    change saves ~500ns per test when Numpy is installed. PR
    #691.
  * Support Python 3.14.
  * Use a different random seed per test, based on the test ID.
    This change should mean that tests exercise more random data
    values in a given run, and that any randomly-generated
    identifiers have a lower chance of collision when stored in a
    shared resource like a database. PR #687. Thanks to Bryce
    Drennan for the suggestion in Issue #600 and initial
    implementation in PR #617.
  * Move from MD5 to CRC32 for hashing test IDs, as it’s 5x
    faster and we don’t need cryptographic security. Issue #686.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-randomly?expand=0&rev=40
2025-09-29 20:52:57 +00:00
5dabab7396 Accepting request 1271889 from devel:languages:python:pytest
OBS-URL: https://build.opensuse.org/request/show/1271889
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-randomly?expand=0&rev=18
2025-04-22 15:31:15 +00:00
b12e13f2e4 - setuptools needed for build
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-randomly?expand=0&rev=38
2025-04-22 13:11:55 +00:00
de49926916 Accepting request 1218839 from devel:languages:python:pytest
- update to 3.16.0:
  * Drop Python 3.8 support.
  * Support Python 3.13.

OBS-URL: https://build.opensuse.org/request/show/1218839
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-randomly?expand=0&rev=17
2024-10-29 13:35:05 +00:00
fbdd34d0f5 - Make model-bakery BuildRequires optional, in SLFO:Main we don't have
python311-django.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-randomly?expand=0&rev=36
2024-10-28 16:48:55 +00:00
eda0c5f3f6 - update to 3.16.0:
* Drop Python 3.8 support.
  * Support Python 3.13.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-randomly?expand=0&rev=35
2024-10-28 16:47:30 +00:00
e952d1ebfe Accepting request 1218761 from devel:languages:python:pytest
- Make model-bakery BuildRequires optional, in SLFO:Main we don't have
  python311-django.

OBS-URL: https://build.opensuse.org/request/show/1218761
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-randomly?expand=0&rev=16
2024-10-28 14:22:42 +00:00
e85bd24e6d - Make model-bakery BuildRequires optional, in SLFO:Main we don't have
python311-django.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-randomly?expand=0&rev=33
2024-10-28 09:42:39 +00:00
4 changed files with 60 additions and 6 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:273e955ff721829977bc5c418bdaa32cba6496ff1925066453eb2d53f23e9406
size 34667

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dc0ad4fc1ff37344b37026063b9587596052215c670094439d68e0eab72cd684
size 52023

View File

@@ -1,3 +1,46 @@
-------------------------------------------------------------------
Mon Sep 29 20:52:21 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 4.0.1:
* Remove the random state caching, which would grow without
bound, leaking memory in long test runs. The caching was
added to slightly speed up re-using the same (final) seed,
but since the final seed is now different for each test, it
has no effect. PR #690.
* Modify Numpy seed restriction, replacing hashing with a
modulo operation. The extra work to hash is unnecessary now
that we generate a final seed per test with CRC32. This
change saves ~500ns per test when Numpy is installed. PR
#691.
* Support Python 3.14.
* Use a different random seed per test, based on the test ID.
This change should mean that tests exercise more random data
values in a given run, and that any randomly-generated
identifiers have a lower chance of collision when stored in a
shared resource like a database. PR #687. Thanks to Bryce
Drennan for the suggestion in Issue #600 and initial
implementation in PR #617.
* Move from MD5 to CRC32 for hashing test IDs, as its 5x
faster and we dont need cryptographic security. Issue #686.
-------------------------------------------------------------------
Tue Apr 22 13:06:29 UTC 2025 - Markéta Machová <mmachova@suse.com>
- setuptools needed for build
-------------------------------------------------------------------
Mon Oct 28 16:48:13 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 3.16.0:
* Drop Python 3.8 support.
* Support Python 3.13.
-------------------------------------------------------------------
Mon Oct 28 09:41:53 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Make model-bakery BuildRequires optional, in SLFO:Main we don't have
python311-django.
-------------------------------------------------------------------
Tue Nov 7 20:04:52 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-randomly
#
# Copyright (c) 2023 SUSE LLC
# 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
@@ -18,13 +18,14 @@
%{?sle15_python_module_pythons}
Name: python-pytest-randomly
Version: 3.15.0
Version: 4.0.1
Release: 0
Summary: Pytest plugin to randomly order tests and control random.seed
License: MIT
URL: https://github.com/pytest-dev/pytest-randomly
Source: https://github.com/pytest-dev/pytest-randomly/archive/%{version}.tar.gz#/pytest-randomly-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -37,7 +38,10 @@ BuildArch: noarch
BuildRequires: %{python_module Faker >= 13.11.0}
BuildRequires: %{python_module factory_boy}
BuildRequires: %{python_module importlib-metadata >= 3.6.0}
# Django package not available on SLFO:Main
%if 0%{suse_version} > 1600
BuildRequires: %{python_module model-bakery >= 1.13.0}
%endif
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
@@ -76,7 +80,14 @@ Features:
%check
# test_entrypoint_injection needs installed module for pytest to use
%pytest -k "not (test_entrypoint_injection or test_it_runs_before_stepwise)"
skiptest="test_entrypoint_injection or test_it_runs_before_stepwise"
# Django package not available on SLFO:Main
%if 0%{suse_version} <= 1600
skiptest+=" or test_model_bakery"
%endif
%pytest -k "not ($skiptest)"
%files %{python_files}
%doc README.rst