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