| 1 | #!/usr/bin/env python2 | 
| 2 | """ | 
| 3 | invalid_format_strings.py | 
| 4 | """ | 
| 5 | from __future__ import print_function | 
| 6 | |
| 7 | |
| 8 | def run_tests(): | 
| 9 | # type: () -> None | 
| 10 | |
| 11 | x = 33 | 
| 12 | |
| 13 | print('x = %z' % x) | 
| 14 | |
| 15 | # TODO: this doesn't fail at translate time | 
| 16 | |
| 17 | # With StrFormat(), it will make it to C++ runtime, past C++ compile time | 
| 18 | #print('x = %x' % x) | 
| 19 | |
| 20 | # Similarly for '%-2d' I believe |