From e7f923905ecc88b2905314202364b9e599b2dc2b Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Sun, 17 Sep 2023 20:02:47 -0500 Subject: [PATCH] more robust _sym_tag_to_num_tag test --- test/test_trace_pair.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test_trace_pair.py b/test/test_trace_pair.py index 7a00701d0..d14bfcdf0 100644 --- a/test/test_trace_pair.py +++ b/test/test_trace_pair.py @@ -87,7 +87,13 @@ class DerivedDerivedCommTag(DerivedCommTag): dct2 = DerivedCommTag() ddct = DerivedDerivedCommTag() - assert _sym_tag_to_num_tag(ct) == 441551355 + try: + from mpi4py import MPI + except ModuleNotFoundError: + pass + else: + tag_ub = MPI.COMM_WORLD.Get_attr(MPI.TAG_UB) + assert _sym_tag_to_num_tag(ct) == (1549868734841116283675 % tag_ub) assert ct == ct2 assert ct != dct