commit 85f0da80a5fb78b877f29c47931923544933dc06 Author: Isis Lovecruft isis@torproject.org Date: Mon Nov 5 14:06:06 2012 +0000
* Added brief doctrings to get pylint to shutup about it. --- bin/ooniprobe | 23 +++++++++++------------ nettests/simpletest.py | 23 +++++++++++++++++------ 2 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/bin/ooniprobe b/bin/ooniprobe index 1e73c85..0742da9 100755 --- a/bin/ooniprobe +++ b/bin/ooniprobe @@ -1,17 +1,16 @@ #!/usr/bin/env python # -*- encoding: utf-8 -*- -############################################################################### -# -# oonicli -# ----------------------- -# -# Run the Twisted Trial (unittest module) based oonicli. Startup script based -# on twisted trial, see http://twistedmatrix.com/ . -# -# :authors: Arturo Filastò -# :licence: see included LICENSE file -# :version: 0.0.1-pre-alpha -############################################################################### +''' + oonicli + ----------- + + Run the Twisted Trial (unittest module) based oonicli. Startup script based + on twisted trial, see http://twistedmatrix.com/ . + + :authors: Arturo Filastò, Isis Lovecruft + :licence: see included LICENSE file + :version: 0.0.1-pre-alpha +'''
import os, sys import copy_reg diff --git a/nettests/simpletest.py b/nettests/simpletest.py index a83b8ce..2769a15 100644 --- a/nettests/simpletest.py +++ b/nettests/simpletest.py @@ -1,18 +1,29 @@ +#-*- coding: utf-8 -*- +"""Contains classes for testing the basic functionality of oonicli.""" + from ooni import nettest + class SimpleTest(nettest.NetTestCase): - inputs = range(1,100) + """ + A very simple test which prints integers, for testing that oonicli is + working correctly. + """ + inputs = range(1, 100) optParameters = [['asset', 'a', None, 'Asset file'], - ['controlserver', 'c', 'google.com', 'Specify the control server'], + ['controlserver', 'c', 'google.com', + 'Specify the control server'], ['resume', 'r', 0, 'Resume at this index'], ['other', 'o', None, 'Other arguments']] - def test_foo(self, *arg, **kw): + def test_foo(self): + """Test that tests are working.""" print "Running %s with %s" % ("test_foo", self.input) self.report['test_foo'] = 'Antani' self.report['shared'] = "sblinda" - self.assertEqual(1,1) + self.assertEqual(1, 1)
- def test_f4oo(self, *arg, **kw): + def test_f4oo(self): + """Test that tests are working.""" print "Running %s with %s" % ("test_f4oo", self.input) self.report['test_f4oo'] = 'Antani' self.report['shared'] = "sblinda2" - self.assertEqual(1,1) + self.assertEqual(1, 1)