Lack of test coverage for basic genshi directives

Bug #502821 reported by Cory Dodt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
txGenshi
Fix Released
Undecided
Cory Dodt

Bug Description

Do some unit testing of the basic template directives, including the use of nevow directives at the same time. This can be as simple as verifying the output of the genshimix demo.

Revision history for this message
Cory Dodt (corydodt) wrote :

Added example.py and test for it. These very simple tests get us to 65% statement coverage:

txgenshi/__init__ 7 7 0 100%
txgenshi/example 21 21 0 100%
txgenshi/loader 58 46 0 79%
txgenshi/test/__init__ 1 1 0 100%
txgenshi/test/test_example 31 30 0 97%
txgenshi/test/test_util 11 11 0 100%
txgenshi/util 116 44 0 38%

100% coverage on loader will only require me to use genshistr in a test, so I'll add that. Not sure what's going on in util yet; I may save that for another bug.

Changed in txgenshi:
assignee: nobody → Cory Dodt (corydodt)
status: New → In Progress
Revision history for this message
Cory Dodt (corydodt) wrote :

Added some tweaks to get 100% for loader.py - now 72% overall.

Coverage report: 72%
Module statements run excluded coverage
Total 256 184 2 72%
txgenshi/util 116 44 0 38%
txgenshi/__init__ 7 7 0 100%
txgenshi/example 28 28 0 100%
txgenshi/loader 56 56 2 100%
txgenshi/test/__init__ 1 1 0 100%
txgenshi/test/test_example 37 37 0 100%
txgenshi/test/test_util 11 11 0 100%

coverage.py v3.2

I'm calling this good, for the scope of this bug. - Committed to the linked branch.

Changed in txgenshi:
status: In Progress → Fix Committed
Revision history for this message
Cory Dodt (corydodt) wrote :

and done.

I don't have a clue about bzr, so I tried to use stacked branches but I don't know if i succeeded. What I ended up doing was:

bzr branch lp:txgenshi txGenshi

bzr branch txGenshi txGenshi-502820
(apply some changes with bzr patch/bzr commit)
bzr push --stacked-on=lp:txgenshi lp:~corydodt/txgenshi/502820

bzr branch txGenshi-502820 txGenshi-502823
(apply changes, commit)
bzr push --stacked-on=bzr+ssh://bazaar.launchpad.net/~corydodt/txgenshi/502820/ lp:~corydodt/txgenshi/502823
# ^^ for some reason lp:~corydodt... did not work there.

bzr branch txGenshi-502823 txGenshi-502821
(apply changes, commit)
bzr push --stacked-on=bzr+ssh://bazaar.launchpad.net/~corydodt/txgenshi/502823/ lp:~corydodt/txgenshi/502821

I got some branch format/repository format errors there so I don't know if any of that worked, if those branches are stacked correctly, or even precisely what stacking is supposed to do. :-) Let me know if there's anything I need to fix.

Revision history for this message
Cory Dodt (corydodt) wrote :

This is in, r19-31.

Changed in txgenshi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.