~wecacuee/mrol/mrol-dev

« back to all changes in this revision

Viewing changes to test/tests.py

  • Committer: Julian Ryde
  • Date: 2011-06-03 16:52:15 UTC
  • Revision ID: julian_ryde-20110603165215-oqr6yo9nwng3j9nb
Initial import from revision 206 of Julian Ryde's mrol_mapping repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/python
 
2
 
 
3
import os
 
4
import subprocess
 
5
 
 
6
# find all tests
 
7
test_files = [tf for tf in os.listdir('.') if tf.endswith('_test.py')]
 
8
 
 
9
# postpone slow tests
 
10
slow_tests = '''
 
11
mapper_test.py
 
12
align_segment_test.py
 
13
'''.split()
 
14
 
 
15
test_files = list(set(test_files) - set(slow_tests))
 
16
 
 
17
#nose_command = 'nosetests -svx --with-coverage'.split()
 
18
#nose_command = 'nosetests -svx --pdb --pdb-failures'.split()
 
19
nose_command = 'nosetests -sv'.split()
 
20
 
 
21
subprocess.call(nose_command + test_files)
 
22
print 'Running slow tests'
 
23
subprocess.call(nose_command + slow_tests)
 
24
 
 
25
print 'For test coverage, use the nosetests coverage option and view results with'
 
26
print 'python-coverage report --omit=/usr/share'