Confirmed users
753
edits
| Line 10: | Line 10: | ||
*Each file should pass [http://www.python.org/dev/peps/pep-0008/ PEP8] except for line length, see below. | *Each file should pass [http://www.python.org/dev/peps/pep-0008/ PEP8] except for line length, see below. | ||
** I.e. parameters should have a comma and a space e.g. | ** I.e. parameters should have a comma and a space e.g. | ||
Good: def method(self, parameter) | Good: def method(self, parameter) | ||
| Line 18: | Line 17: | ||
**Lines should try not to have more than 100 characters. This allows 2 files to be side by side with no overlap for easier development.(I base this on MacVim on my MBP) | |||
**Indenting should be a soft tab(4 spaces) as common with in Python. Do not mix tabs and spaces | |||
**There should be no whitespace at the end of the file(as per PEP8) | |||
**Comments should be on the line above. Remember to update comments when changing code so that code matches the comments. | |||
**Class names should be in Pascal style as this is Python idiomatic | |||
Good: class TestThisSite(unittest.TestCase): | Good: class TestThisSite(unittest.TestCase): | ||
Bad: class test_this_site(unittest.TestCase): | Bad: class test_this_site(unittest.TestCase): | ||
==Page Object Style Guide== | ==Page Object Style Guide== | ||