~thomas-deruyter-3/qreator/qreator

« back to all changes in this revision

Viewing changes to tests/test_lint.py

  • Committer: Stefan Schwarzburg
  • Date: 2013-01-27 12:42:54 UTC
  • mto: This revision was merged to the branch mainline in revision 131.
  • Revision ID: stefan.schwarzburg@googlemail.com-20130127124254-lfusogqf9ba2bdf1
changed simple tests to nosetests with code evaluation

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import unittest
19
19
import subprocess
20
20
 
 
21
 
21
22
class TestPylint(unittest.TestCase):
22
 
    def test_project_errors_only(self):
23
 
        '''run pylint in error only mode
24
 
        
25
 
        your code may well work even with pylint errors
26
 
        but have some unusual code'''
27
 
        return_code = subprocess.call(["pylint", '-E', 'qreator'])
28
 
        # not needed because nosetests displays pylint console output
29
 
        #self.assertEqual(return_code, 0)
30
23
 
31
 
    # un-comment the following for loads of diagnostics   
32
 
    #~ def test_project_full_report(self):
33
 
        #~ '''Only for the brave
34
 
#~ 
35
 
        #~ you will have to make judgement calls about your code standards
36
 
        #~ that differ from the norm'''
37
 
        #~ return_code = subprocess.call(["pylint", 'qreator'])
 
24
    # un-comment the following for loads of diagnostics
 
25
    def test_project_full_report(self):
 
26
        '''Only for the brave
 
27
        you will have to make judgement calls about your code standards
 
28
        that differ from the norm'''
 
29
        #subprocess.call(["pylint", '-E', 'qreator'])
 
30
        subprocess.call(["pylint", 'qreator', 'qreator_lib'])
38
31
 
39
32
if __name__ == '__main__':
40
 
    'you will get better results with nosetests'
41
 
    unittest.main()
 
33
    # you will get better results with nosetests
 
34
    import nose
 
35
    nose.main()