Merge lp:~allenap/launchpad/id-for-yui-test-cases into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12639 |
Proposed branch: | lp:~allenap/launchpad/id-for-yui-test-cases |
Merge into: | lp:launchpad |
Diff against target: |
71 lines (+25/-5) 2 files modified
lib/lp/testing/__init__.py (+18/-1) lib/lp/testing/tests/test_testing.py (+7/-4) |
To merge this branch: | bzr merge lp:~allenap/launchpad/id-for-yui-test-cases |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | Approve | ||
Review via email: mp+54229@code.launchpad.net |
Commit message
[r=jml][no-qa] Implement YUIUnitTestCase
Description of the change
This branch fixes the following:
{{{
$ bin/test --layer WindmillLayer -t yuitest --list-tests
Listing lp.app.
lp.app.
lp.app.
Listing lp.bugs.
lp.bugs.
lp.bugs.
Listing lp.code.
lp.code.
Listing lp.registry.
lp.registry.
lp.registry.
lp.registry.
Listing lp.soyuz.
lp.soyuz.
lp.soyuz.
}}}
to look more like:
{{{
$ bin/test --layer WindmillLayer -t javascript/tests --list-tests
Listing lp.app.
lp/app/
lp/app/
Listing lp.bugs.
lp/bugs/
lp/bugs/
Listing lp.code.
lp/code/
Listing lp.registry.
lp/registry/
lp/registry/
Listing lp.soyuz.
lp/soyuz/
lp/soyuz/
}}}
<jml> allenap: Looks basically sane to me. Two things come to mind. l(test. test_path, test.id())
<jml> allenap: first is that you should add a test for this.
<jml> allenap: second is that the ideal id() allows you to load the test based on the id. I don't know enough about how JS tests are run to know if that's the case here. It seems likely though.
<allenap> jml: Fair. This whole class is untested so I was hoping to sneak this one through too.
<jml> allenap: self.assertEqua
<jml> allenap: there you go, I've written the test for you :P
<allenap> jml: Cheers :)
<jml> also, in random spam news, I may be entitled to receive £3750 for the accident I had. (I didn't have an accident)
<jml> allenap: looks like a very useful change to make
I would have made the ID for like foo.bar.baz than foo/bar/baz.html, but I think that's actually not necessary, and maybe not even universally preferable. The general principles are uniqueness and being able to load the test based on the id.
Thanks Gavin.