From 9a698b64d7326ea2bfb10b27f69a8ce4ee13c760 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Thu, 5 Nov 2026 22:06:11 +0200 Subject: [PATCH] Test: the Brownian 'other internals' test starts from the stock sampler, whatever an earlier test or the pack load already widened Co-Authored-By: Claude Sonnet 5.5 --- core/tests/test_brownian.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/tests/test_brownian.py b/core/tests/test_brownian.py index 1504c9fe..1ee5aadf 100644 --- a/core/tests/test_brownian.py +++ b/core/tests/test_brownian.py @@ -111,8 +111,11 @@ def test_the_noise_dtype_is_the_stock_dtype_for_a_reduced_precision_latent(patch def test_a_torchsde_with_other_internals_leaves_the_stock_sampler_in_place(monkeypatch): original = ksampling.BrownianTreeNoiseSampler + while getattr(original, "_funui_widened", False): # an earlier test, or the pack loading, may already have widened it + original = original.__mro__[1] + monkeypatch.setattr(ksampling, "BrownianTreeNoiseSampler", original) mod = _brownian() - mod._installed = False + monkeypatch.setattr(mod, "_installed", False) monkeypatch.setattr(mod, "_internals_present", lambda k: False) mod.install() assert ksampling.BrownianTreeNoiseSampler is original and not mod._installed