Verified Commit 94bd25ef authored by Yunus Sevinchan's avatar Yunus Sevinchan
Browse files

Adjust tests for Python 3.14; relax DAG deepcopy benchmark

In Python 3.14, either regular copy is very fast or pickling is not yet
optimized, so we relax the test requirement for now.
parent 13bfade1
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2264,7 +2264,7 @@ allow_failure_upstream_with_error_in_fallback:
  compute_only: [final_result]
  _raises: DataOperationError
  _raises_on_compute: true
  _match: "ValueError: math domain error"
  _match: "ValueError"  # "domain error" py<3.14, "expected a positive" beyond


# Examples in documentation ---------------------------------------------------
+8 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

import copy
import os
import sys
import time
import timeit
from builtins import *  # to have Exception types available in globals
@@ -254,6 +255,13 @@ def test_deepcopy(dm):
    for name, _dt in dt.items():
        print(f"  {name:>10s}:  {_dt:.3g}s\t({dt['regular'] / _dt:.3g}x)")

    # For Python 3.14, this is not yet optimized ...
    # We can be happy if it is not slower.
    # TODO Remove this once it is optimized!
    if sys.version_info.minor >= 14:
        assert dt["regular"] / dt["pickle"] > 1.0
        assert dt["dill"] / dt["pickle"] > 1.0
    else:
        assert dt["regular"] / dt["pickle"] > 5
        assert dt["dill"] / dt["pickle"] > 10