root/pyyaml-legacy/tags/PyYaml_0.32/TestFileNamesInErrors.py

Revision 75, 297 bytes (checked in by tim, 5 years ago)

tagged the pre fork version

  • Property svn:executable set to *
Line 
1 #!/usr/bin/env python
2 import yaml, re
3 try:
4     print yaml.loadFile('TestFileNamesInErrors.py').next()
5     raise "YAML actually parsed this file, uh oh!"
6 except Exception, e:
7     if not re.search('TestFileNamesInErrors\.py', str(e)):
8         raise 'YAML not reporting filename properly ("%s")' % e
Note: See TracBrowser for help on using the browser.