Merge lp://staging/~bryce/quickly/template_tests into lp://staging/quickly

Proposed by Bryce Harrington
Status: Rejected
Rejected by: Michael Terry
Proposed branch: lp://staging/~bryce/quickly/template_tests
Merge into: lp://staging/quickly
Diff against target: 36 lines (+26/-0)
2 files modified
data/templates/ubuntu-application/project_root/run-tests (+7/-0)
data/templates/ubuntu-application/project_root/tests/test_example (+19/-0)
To merge this branch: bzr merge lp://staging/~bryce/quickly/template_tests
Reviewer Review Type Date Requested Status
Michael Terry (community) Needs Fixing
Review via email: mp+47172@code.staging.launchpad.net

Description of the change

Stubs in a test directory, run script, and example test.

Opportunistic programmers may not normally think to write tests, but we all know how important they can be for ongoing maintenance of an application. In case they don't know how to set up a unittest framework, this removes that roadblock from them.

Obviously this could be improved upon a lot, but my thinking is that by keeping the test code simple, it won't look intimidating to newbs.

It might make sense to include a test that tests some of the generated classes in the project_root/python/ directory, both as working examples and to ensure all quickly projects begin life with 100% test coverage.

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

It'd be nice to have 'run-tests' exit with a non-zero value if any test failed for ease of integration into an automated test run.

And do you know if python-distutils (or -extra) has support for finding and running a test suite? Would be good to make this suite match distutils' expectations.

Also... Maybe a good first test would be to call pylint on the project? There's an example of good pylint arguments in my branch that adds a pylint test to quickly itself: https://code.launchpad.net/~mterry/quickly/pylint/+merge/42501

review: Needs Fixing
Revision history for this message
Michael Terry (mterry) wrote :

Oh, but thanks! This is a great idea. :)

Revision history for this message
Tony Byrne (tony-badwolf) wrote :

Nice idea. The supplied bash script generates an warning when you quickly package so I pushed a new branch that uses "quickly test" instead. The supplied unittest did not refer to the user's project so I upgraded to actually test a trivial project property to "document" the linkage. Uses nosetest to automatically create the test suite.

https://code.launchpad.net/~tony-badwolf/quickly/project_tests

Revision history for this message
Michael Terry (mterry) wrote :

I'll mark this as rejected since we merged a different but similar branch. Thanks, Bryce!

Unmerged revisions

583. By Bryce Harrington

Add a simple stubbed-in unit test framework to the quickly templates

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches