File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -35,25 +35,14 @@ def testLocationEnterExit():
3535 # Asserting a different context should clear it.
3636 with Context () as ctx2 :
3737 assert Context .current is ctx2
38- try :
39- _ = Location .current
40- except ValueError :
41- pass
42- else :
43- assert False , "Expected exception"
38+ assert Location .current is None
4439
4540 # And should restore.
4641 assert Context .current is ctx1
4742 assert Location .current is loc1
4843
4944 # All should clear.
50- try :
51- _ = Location .current
52- except ValueError as e :
53- # CHECK: No current Location
54- print (e )
55- else :
56- assert False , "Expected exception"
45+ assert Location .current is None
5746
5847
5948run (testLocationEnterExit )
@@ -72,12 +61,7 @@ def testInsertionPointEnterExit():
7261 assert InsertionPoint .current is ip
7362 assert Location .current is loc1
7463 # Location should clear.
75- try :
76- _ = Location .current
77- except ValueError :
78- pass
79- else :
80- assert False , "Expected exception"
64+ assert Location .current is None
8165
8266 # Asserting the same Context should preserve.
8367 with ctx1 :
You can’t perform that action at this time.
0 commit comments