root/mail-onna-stick/trunk/bin/profile-twill-tests

Revision 245, 0.5 kB (checked in by t, 11 years ago)

major coverage & unit test hacking.

* separated coverage.py into coverage.py and coverage_lib.py;
* coverage_lib contains all the functionality;
* coverage.py does the nasty on-import stuff involving loading/saving of

coverage info;

* DEBUG_AVOID_SLOW in mostest.py now defines whether or not twill tests

will take a long time or not; it's set so that 'nosetests' and
'python setup.py test' will be fast, while the bin/ test running stuff
will be slow and thorough.

Still have to fix saving of coverage info in various situations.

  • Property svn:executable set to *
Line 
1 #! /usr/bin/env python
2 import _mypath
3 import sys, os
4
5 import mostest, unittest
6 import statprof
7
8 twill_test_dir = '../tests/twill-tests'
9 twill_test_dir = os.path.join(_mypath.this_dir, twill_test_dir)
10 twill_test_dir = os.path.abspath(twill_test_dir)
11
12 suite = mostest.collector(twill_test_dir, record_coverage=False,
13                           avoid_slow=False)
14 t = unittest.TextTestRunner(verbosity=2)
15
16 statprof.start()
17 result = t.run(suite)
18 statprof.stop()
19
20 assert result.wasSuccessful()
21
22 t.stream.writeln("\nPROFILING RESULTS:\n")
23 statprof.display(t.stream, 2.0)
Note: See TracBrowser for help on using the browser.