| 390 | ''', annotate=20) |
| 391 | |
| 392 | def test_string(self): |
| 393 | self.check_dis(b"S'abc'\n.", '''\ |
| 394 | 0: S STRING 'abc' |
| 395 | 7: . STOP |
| 396 | highest protocol among opcodes = 0 |
| 397 | ''') |
| 398 | self.check_dis(b'S"abc"\n.', '''\ |
| 399 | 0: S STRING 'abc' |
| 400 | 7: . STOP |
| 401 | highest protocol among opcodes = 0 |
| 402 | ''') |
| 403 | self.check_dis(b"S'\xc3\xb5'\n.", '''\ |
| 404 | 0: S STRING '\\xc3\\xb5' |
| 405 | 6: . STOP |
| 406 | highest protocol among opcodes = 0 |
| 407 | ''') |
| 408 | |
| 409 | def test_string_without_quotes(self): |
| 410 | self.check_dis_error(b"Sabc'\n.", '', |