diff options
Diffstat (limited to 'tests/cpydiff/syntax_spaces.py')
-rw-r--r-- | tests/cpydiff/syntax_spaces.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/cpydiff/syntax_spaces.py b/tests/cpydiff/syntax_spaces.py new file mode 100644 index 0000000000..8578a51e28 --- /dev/null +++ b/tests/cpydiff/syntax_spaces.py @@ -0,0 +1,18 @@ +""" +categories: Syntax,Spaces +description: uPy requires spaces between literal numbers and keywords, CPy doesn't +cause: Unknown +workaround: Unknown +""" +try: + print(eval('1and 0')) +except SyntaxError: + print('Should have worked') +try: + print(eval('1or 0')) +except SyntaxError: + print('Should have worked') +try: + print(eval('1if 1else 0')) +except SyntaxError: + print('Should have worked') |