@@ -1453,12 +1453,12 @@ def EliminationOverAddition():
1453
1453
bluc = None
1454
1454
print (bluch )
1455
1455
1456
- for func , suggestion in [(Substitution , "blech?" ),
1457
- (Elimination , "blch?" ),
1458
- (Addition , "bluchin?" ),
1459
- (EliminationOverAddition , "blucha?" ),
1460
- (SubstitutionOverElimination , "blach?" ),
1461
- (SubstitutionOverAddition , "blach?" )]:
1456
+ for func , suggestion in [(Substitution , "' blech' ?" ),
1457
+ (Elimination , "' blch' ?" ),
1458
+ (Addition , "' bluchin' ?" ),
1459
+ (EliminationOverAddition , "' blucha' ?" ),
1460
+ (SubstitutionOverElimination , "' blach' ?" ),
1461
+ (SubstitutionOverAddition , "' blach' ?" )]:
1462
1462
err = None
1463
1463
try :
1464
1464
func ()
@@ -1475,7 +1475,7 @@ def func():
1475
1475
except NameError as exc :
1476
1476
with support .captured_stderr () as err :
1477
1477
sys .__excepthook__ (* sys .exc_info ())
1478
- self .assertIn ("global_for_suggestions?" , err .getvalue ())
1478
+ self .assertIn ("' global_for_suggestions' ?" , err .getvalue ())
1479
1479
1480
1480
def test_name_error_suggestions_from_builtins (self ):
1481
1481
def func ():
@@ -1485,7 +1485,7 @@ def func():
1485
1485
except NameError as exc :
1486
1486
with support .captured_stderr () as err :
1487
1487
sys .__excepthook__ (* sys .exc_info ())
1488
- self .assertIn ("AttributeError?" , err .getvalue ())
1488
+ self .assertIn ("' AttributeError' ?" , err .getvalue ())
1489
1489
1490
1490
def test_name_error_suggestions_do_not_trigger_for_long_names (self ):
1491
1491
def f ():
@@ -1628,12 +1628,12 @@ class EliminationOverAddition:
1628
1628
blucha = None
1629
1629
bluc = None
1630
1630
1631
- for cls , suggestion in [(Substitution , "blech?" ),
1632
- (Elimination , "blch?" ),
1633
- (Addition , "bluchin?" ),
1634
- (EliminationOverAddition , "bluc?" ),
1635
- (SubstitutionOverElimination , "blach?" ),
1636
- (SubstitutionOverAddition , "blach?" )]:
1631
+ for cls , suggestion in [(Substitution , "' blech' ?" ),
1632
+ (Elimination , "' blch' ?" ),
1633
+ (Addition , "' bluchin' ?" ),
1634
+ (EliminationOverAddition , "' bluc' ?" ),
1635
+ (SubstitutionOverElimination , "' blach' ?" ),
1636
+ (SubstitutionOverAddition , "' blach' ?" )]:
1637
1637
try :
1638
1638
cls ().bluch
1639
1639
except AttributeError as exc :
0 commit comments