ef175bf66282fcc3bab492345bc85fa78e2abe6e vsmalladi Fri Apr 6 13:25:42 2012 -0700 Fixed some typo's. diff --git python/style.txt python/style.txt index d629e38..9d28c3a 100644 --- python/style.txt +++ python/style.txt @@ -66,31 +66,31 @@ __init__.py ra.py cv.py ... For more information: http://docs.python.org/tutorial/modules.html Imports The most correct way to import something in Python is by specifying its containing module: import os from ucscGenomics import ra Then, the qualified name can be used: - somerRa = ra.RaFile() + someRa = ra.RaFile() Do not import as below, as this may cause local naming conflicts: from ucscGenomics.ra import RaFile from ucscGenomics.track import * Imports should follow the structure: 1. Each import should be on a separate line, unless modules are from the same package: import os import sys from ucscGenomics import ra, track, qa 2. Imports should be at the top of the file. Each section should be separated by a blank line: @@ -190,21 +190,21 @@ import unittest 2. A test case is created as a sub-class of unittest.TestCase: class TestSomeFunctions(unittest.TestCase): 3. Test method names should begin with 'test' so that the test runner is aware of which methods are tests: def testSomeSpecificFuntion(self): 4. Define a setUp method to run prior to start of each test. def setUp(self): 5. Define a tearDown method to run after each test. def tearDown(self): - 6. To invoke tests with a simple command-line interface add the add the following lines: + 6. To invoke tests with a simple command-line interface add the following lines: if __name__ == '__main__': unittest.main() For other ways to run tests see: http://docs.python.org/library/unittest.html