| Revision 52,
818 bytes
checked in by xi, 7 years ago
(diff) |
|
Cleanup error messages.
|
| Line | |
|---|
| 1 | |
|---|
| 2 | import test_appliance |
|---|
| 3 | |
|---|
| 4 | class TestSyck(test_appliance.TestAppliance): |
|---|
| 5 | |
|---|
| 6 | def _testSyckOnTokenTests(self, test_name, data_filename, tokens_filename): |
|---|
| 7 | try: |
|---|
| 8 | syck.parse(file(data_filename, 'rb')) |
|---|
| 9 | except: |
|---|
| 10 | print |
|---|
| 11 | print "DATA:" |
|---|
| 12 | print file(data_filename, 'rb').read() |
|---|
| 13 | raise |
|---|
| 14 | |
|---|
| 15 | def _testSyckOnCanonicalTests(self, test_name, data_filename, canonical_filename): |
|---|
| 16 | try: |
|---|
| 17 | syck.parse(file(data_filename, 'rb')) |
|---|
| 18 | except: |
|---|
| 19 | print |
|---|
| 20 | print "DATA:" |
|---|
| 21 | print file(data_filename, 'rb').read() |
|---|
| 22 | raise |
|---|
| 23 | |
|---|
| 24 | try: |
|---|
| 25 | import syck |
|---|
| 26 | #TestSyck.add_tests('testSyckOnTokenTests', '.data', '.tokens') |
|---|
| 27 | #TestSyck.add_tests('testSyckOnCanonicalTests', '.data', '.canonical') |
|---|
| 28 | except ImportError: |
|---|
| 29 | pass |
|---|
| 30 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.