From dd7d9a4450dc80668dabe33262ffee18648b4b88 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 27 May 2015 21:33:07 -0400 Subject: Dict literals changed in 3.5b1 --- tests/test_arcs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_arcs.py b/tests/test_arcs.py index a4462ea1..c0cbac7c 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -672,6 +672,11 @@ class MiscArcTest(CoverageTest): """Miscellaneous arc-measuring tests.""" def test_dict_literal(self): + if env.PYVERSION < (3, 5): + arcz = ".1 19 9." + else: + # Python 3.5 changed how dict literals are constructed. + arcz = ".1 19 9-2" self.check_coverage("""\ d = { 'a': 2, @@ -683,7 +688,7 @@ class MiscArcTest(CoverageTest): } assert d """, - arcz=".1 19 9.") + arcz=arcz) def test_pathologically_long_code_object(self): # https://bitbucket.org/ned/coveragepy/issue/359 -- cgit v1.2.1