Jeroen T. Vermeulen has proposed merging
lp:~jtv/launchpad/standard-test-template into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers): code
Related bugs:
#606768 "make lint" stumbles over softlinks
https://bugs.launchpad.net/bugs/606768
= Test Standard Test Template =
Now that the standard_test_template.py sample test contains an actual test
class, we might as well include it in the test suite. It'll help us spot
breakage that would otherwise be quiet, such as if we moved TestCase out of
lib/lp/testing/__init__.py or put the layers in a different place.
Jono suggested that I do this by moving the template file into a testable
location, and replace the original with a symlink to the test. (We also
considered linking the other way, but that was less clear).
While doing this I noticed bug 606768: "make lint" breaks because it gets a
list of changed files from "bzr st," and any symlinks in this list are tagged
with a trailing @. I fixed that by filtering out trailing @ markers. I also
verified that this still works when I edit one of the test GPG keys, which have
a @ somewhere in the middle of the name.
To test,
{{{
./bin/test -vvc -m lp.testing.tests.test_standard_test_template
}}}
No lint, once I fixed lint.
Jeroen
--
https://code.launchpad.net/~jtv/launchpad/standard-test-template/+merge/30193
Your team Launchpad code reviewers is requested to review the proposed merge of
lp:~jtv/launchpad/standard-test-template into lp:launchpad/devel.
=== modified file 'buildout-templates/bin/lint.sh.in'
--- buildout-templates/bin/lint.sh.in 2010-07-06 13:16:00 +0000
+++ buildout-templates/bin/lint.sh.in 2010-07-17 21:48:46 +0000
@@ -50,7 +50,9 @@
# bzr diff failed
exit 1
fi
- files=`bzr st --short $rev_option | sed '/^.[MN]/!d; s/.* //'`
+ # Extract filename from status line. Strip the @ that mark symlinks.
+ files=`bzr st --short $rev_option |
+ sed -e '/^.[MN]/!d; s/.* //' -e 's/@$//'`
else
# Add newlines so grep filters out pyfiles correctly later.
files=`echo $* | tr " " "\n"`
=== renamed file 'standard_test_template.py' => 'lib/lp/testing/tests/test_standard_test_template.py'
=== added symlink 'standard_test_template.py'
=== target is u'lib/lp/testing/tests/test_standard_test_template.py'
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help : https://help.launchpad.net/ListHelp