File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1414 os : [ubuntu-latest, macos-latest, windows-latest]
1515 python : ['3.11']
1616 include :
17+ - os : ubuntu-latest
18+ python : ' pypy3.9'
19+ - os : ubuntu-latest
20+ python : ' pypy3.8'
21+ - os : ubuntu-latest
22+ python : ' pypy3.7'
1723 - os : ubuntu-latest
1824 python : ' 3.7'
1925 - os : ubuntu-latest
Original file line number Diff line number Diff line change @@ -392,22 +392,24 @@ def test_raises_if_setup_and_stmt_contain_invalid_syntax(self):
392392 Timer (setup = "foo = 'bar', \\ " , stmt = "bar = 'baz'" )
393393
394394 err = cm .exception
395+ found = False
396+ for msg in ["Unknown character" , "unexpected character after line" ]:
397+ if msg in str (err ):
398+ found = True
395399
396- if PYPY :
397- self .assertTrue ("Unknown character" in str (err ))
398- else :
399- self .assertTrue ('unexpected character after line' in str (err ))
400+ self .assertTrue (found )
400401
401402 def test_raises_if_stmt_and_teardown_contain_invalid_syntax (self ):
402403 with self .assertRaises (SyntaxError ) as cm :
403404 Timer (stmt = "foo = 'bar', \\ " , teardown = "bar = 'baz'" )
404405
405406 err = cm .exception
407+ found = False
408+ for msg in ["Unknown character" , "unexpected character after line" ]:
409+ if msg in str (err ):
410+ found = True
406411
407- if PYPY :
408- self .assertTrue ("Unknown character" in str (err ))
409- else :
410- self .assertTrue ('unexpected character after line' in str (err ))
412+ self .assertTrue (found )
411413
412414 def test_returns_valid_template_if_setup_is_str (self ):
413415 setup = "foo = 'bar'\n bar = 'baz'"
You can’t perform that action at this time.
0 commit comments