| Revision 77,
546 bytes
checked in by tim, 9 years ago
(diff) |
|
added tests folder
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | import profile |
|---|
| 2 | import pstats |
|---|
| 3 | import yaml |
|---|
| 4 | import glob |
|---|
| 5 | |
|---|
| 6 | def loadAllFiles(): |
|---|
| 7 | testFiles = glob.glob('TestingSuite/*.yml') |
|---|
| 8 | for file in testFiles: |
|---|
| 9 | docs = yaml.loadFile(file) |
|---|
| 10 | for doc in docs: |
|---|
| 11 | exercise(doc) |
|---|
| 12 | |
|---|
| 13 | def exercise(doc): |
|---|
| 14 | if 'python' in doc: |
|---|
| 15 | if 'yaml' in doc: |
|---|
| 16 | for subDoc in yaml.load(doc['yaml']): |
|---|
| 17 | pass |
|---|
| 18 | |
|---|
| 19 | profile.run('loadAllFiles()', 'profileResults') |
|---|
| 20 | |
|---|
| 21 | p = pstats.Stats('profileResults') |
|---|
| 22 | file = open("profile.out", "w") |
|---|
| 23 | p.sort_stats('time').print_stats(25) |
|---|
Note: See
TracBrowser
for help on using the repository browser.