| 366 | ''', annotate=20) |
| 367 | |
| 368 | def test_string(self): |
| 369 | self.check_dis(b"S'abc'\n.", '''\ |
| 370 | 0: S STRING 'abc' |
| 371 | 7: . STOP |
| 372 | highest protocol among opcodes = 0 |
| 373 | ''') |
| 374 | self.check_dis(b'S"abc"\n.', '''\ |
| 375 | 0: S STRING 'abc' |
| 376 | 7: . STOP |
| 377 | highest protocol among opcodes = 0 |
| 378 | ''') |
| 379 | self.check_dis(b"S'\xc3\xb5'\n.", '''\ |
| 380 | 0: S STRING '\\xc3\\xb5' |
| 381 | 6: . STOP |
| 382 | highest protocol among opcodes = 0 |
| 383 | ''') |
| 384 | |
| 385 | def test_string_without_quotes(self): |
| 386 | self.check_dis_error(b"Sabc'\n.", '', |