~daubers/+junk/rdghackauthbot

« back to all changes in this revision

Viewing changes to rdghacksignbot/tests/test_lint.py

  • Committer: Matt Daubney
  • Date: 2011-12-29 22:25:47 UTC
  • Revision ID: matt@daubers.co.uk-20111229222547-e10vqkoc0y6pnr5w
* GTK stuff

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
 
3
### BEGIN LICENSE
 
4
# This file is in the public domain
 
5
### END LICENSE
 
6
 
 
7
import unittest
 
8
import subprocess
 
9
 
 
10
class TestPylint(unittest.TestCase):
 
11
    def test_project_errors_only(self):
 
12
        '''run pylint in error only mode
 
13
        
 
14
        your code may well work even with pylint errors
 
15
        but have some unusual code'''
 
16
        return_code = subprocess.call(["pylint", '-E', 'rdghacksignbot'])
 
17
        # not needed because nosetests displays pylint console output
 
18
        #self.assertEqual(return_code, 0)
 
19
 
 
20
    # un-comment the following for loads of diagnostics   
 
21
    #~ def test_project_full_report(self):
 
22
        #~ '''Only for the brave
 
23
#~ 
 
24
        #~ you will have to make judgement calls about your code standards
 
25
        #~ that differ from the norm'''
 
26
        #~ return_code = subprocess.call(["pylint", 'rdghacksignbot'])
 
27
 
 
28
if __name__ == '__main__':
 
29
    'you will get better results with nosetests'
 
30
    unittest.main()