diff options
author | Sean Dague <sdague@linux.vnet.ibm.com> | 2013-01-06 19:17:33 -0500 |
---|---|---|
committer | Sean Dague <sdague@linux.vnet.ibm.com> | 2013-01-14 14:39:49 -0500 |
commit | 313279f99adff97c04fa70069ceebd4c2c0da5db (patch) | |
tree | aeb1a8687996008a6d27737e9c066333fcbcee6d /run_tests.sh | |
parent | 59333ce9f3b012ad63a004d16534ad19e998d9a8 (diff) | |
download | nova-313279f99adff97c04fa70069ceebd4c2c0da5db.tar.gz |
enable hacking.py self tests
pep8 and hacking.py (by inheritance) have the ability to run self
tests via docstrings, if we format the comments correctly, and change
the docstring test regex. Include self testing in our normal pep8
tests.
fix the comments to actually be test case compliant
fix nova_import_alphabetical to pass on short import lists (only 2
lines, starting at the beginning of a file)
comment where it doesn't appear that hacking.py tests are working
(though there could be deeper black magic in some of them).
fix a doc string in pep8 self tests that breaks N301
fix the fact that pep8 error strings are supposed to start with
\w\d\d\d, we were just lucking out on some formatting because the
string NOVA happened to be only 4 chars long.
Add a couple of escapes so that we don't recursively fail on our
own fail self tests for comments. (boy that's fun)
Change-Id: I14d5e04cfc092b37ec4967cd7485e9975a5eb820
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-x | run_tests.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/run_tests.sh b/run_tests.sh index 1a54c1bef9..3a579ca362 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -123,6 +123,12 @@ function run_pep8 { # Until all these issues get fixed, ignore. ignore='--ignore=E12,E711,E721,E712' + # First run the hacking selftest, to make sure it's right + echo "Running hacking.py self test" + ${wrapper} python tools/hacking.py --doctest + + # Then actually run it + echo "Running pep8" ${wrapper} python tools/hacking.py ${ignore} ${srcfiles} # NOTE(sdague): as of grizzly-2 these are passing however leaving the comment |