From: Victor Stinner Date: Fri, 22 Jan 2016 14:04:27 +0000 (+0100) Subject: Issue #25876: Fix also test_set() of test_gdb when -E command line is used X-Git-Tag: v3.6.0a1~713 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a701f03047dbf14132e447e6bb6bdfe8ea9c33e;p=python Issue #25876: Fix also test_set() of test_gdb when -E command line is used --- diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py index cc5aab1d1e..3fe15e4507 100644 --- a/Lib/test/test_gdb.py +++ b/Lib/test/test_gdb.py @@ -367,9 +367,12 @@ class PrettyPrintTests(DebuggerTests): 'Verify the pretty-printing of sets' if (gdb_major_version, gdb_minor_version) < (7, 3): self.skipTest("pretty-printing of sets needs gdb 7.3 or later") - self.assertGdbRepr(set(), 'set()') - self.assertGdbRepr(set(['a', 'b']), "{'a', 'b'}") - self.assertGdbRepr(set([4, 5, 6]), "{4, 5, 6}") + self.assertGdbRepr(set(), "set()") + self.assertGdbRepr(set(['a']), "{'a'}") + # PYTHONHASHSEED is need to get the exact frozenset item order + if not sys.flags.ignore_environment: + self.assertGdbRepr(set(['a', 'b']), "{'a', 'b'}") + self.assertGdbRepr(set([4, 5, 6]), "{4, 5, 6}") # Ensure that we handle sets containing the "dummy" key value, # which happens on deletion: