Created
May 2, 2014 13:10
-
-
Save ibizaman/5cc7694f5431fb613ecf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ============================================== FAILURES ============================================== | |
| __________________________________ test_backslash_not_in_formatting __________________________________ | |
| def test_backslash_not_in_formatting(): | |
| > check_dumps("if a not \\\n in b: pass\n") | |
| tests/test_dumper.py:527: | |
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
| source_code = 'if a not \\\n in b: pass\n' | |
| def check_dumps(source_code): | |
| try: | |
| open("/tmp/c", "w").write(source_code) | |
| open("/tmp/d", "w").write(dumps(baron_parse(source_code))) | |
| except Exception as e: | |
| import sys | |
| import json | |
| import traceback | |
| traceback.print_exc(file=sys.stdout) | |
| sys.stdout.write("Warning: couldn't write dumps output to debug file, exception: %s\n\n" % e) | |
| sys.stdout.write("Tree: %s" % json.dumps(baron_parse(source_code), indent=4) + "\n") | |
| > assert dumps(baron_parse(source_code)) == source_code | |
| E assert 'if a b: pass\n' == 'if a not \\\n in b: pass\n' | |
| E - if a b: pass | |
| E + if a not \ | |
| E + in b: pass | |
| tests/test_utils.py:38: AssertionError | |
| ------------------------------------------ Captured stderr ------------------------------------------- | |
| /users/ppx/python/baron/baron/baron/tests/test_utils.py:28: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/c' mode='w' encoding='UTF-8'> | |
| open("/tmp/c", "w").write(source_code) | |
| /users/ppx/python/baron/baron/baron/tests/test_utils.py:29: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/d' mode='w' encoding='UTF-8'> | |
| open("/tmp/d", "w").write(dumps(baron_parse(source_code))) | |
| =============================== 1 failed, 874 passed in 12.58 seconds ================================ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment