Hi!

The package description for python3-nose-random says:

  * uses a fixed seed so that each test run is identical
  * lets you to run the test only on a specific scenario to facilitate
    debugging

I'm not very familiar with this package, but the removal of rseed in
the patch seems to me to break those properties, since it no longer
uses a fixed seed.

The real problem seems to be that config.scenario can be _missing,
which is an object() instead of a supported seed type.

I've attached a patch that fixes the original problem -- jsondiff's
tests no longer fail -- without removing the use of rseed.

- FC
--- a/nose_random/__init__.py	2023-01-04 07:38:06.340805543 +0100
+++ b/nose_random/__init__.py	2016-10-19 11:17:54.000000000 +0200
@@ -51,7 +51,7 @@
 def randomize(n, scenario_generator, seed=12038728732):
     def decorator(test):
         def randomized_test(self):
-            if config.scenario is not None and config.scenario is not _missing:
+            if config.scenario is not None:
                 nseeds = 1
                 seeds = [config.scenario]
             else:
@@ -70,4 +70,4 @@
                     else:
                         raise (type(e), type(e)('%s with scenario %s (%i of %i)' % (e.message, rseed, i+1, nseeds)), sys.exc_info()[2])
         return randomized_test
-    return decorator
+    return decorator
\ No newline at end of file

Reply via email to