Merge lp:~carifio/dotdepends/dotdepends-unittests into lp:dotdepends
Status: | Rejected |
---|---|
Rejected by: | Kyle Nitzsche |
Proposed branch: | lp:~carifio/dotdepends/dotdepends-unittests |
Merge into: | lp:dotdepends |
Diff against target: |
384 lines (+153/-57) 5 files modified
Dotdepends/__init__.py (+3/-0) test/test_Dot.py (+76/-0) test/test_dotdepends_executable.py (+53/-37) test/test_template.py (+6/-5) test/test_template_executable.py (+15/-15) |
To merge this branch: | bzr merge lp:~carifio/dotdepends/dotdepends-unittests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Carifio | Pending | ||
Review via email: mp+114513@code.launchpad.net |
Description of the change
Response to mfisch review, focused on unittests per kyleN direction.
Unmerged revisions
- 78. By Mike Carifio
-
test/test_Dot.py:
- Added test test_no_dot_file(), which expects to receive an exception when creating
a Dot object with no path.- Added test test_no_
dot_file_ bad_path( ), which does the same but this a file pathname. - Added -- and then skipped -- test test_no_contents(). This test tries to simulate a file
with a string using StringIO. Unfortunately, Dot.__init__() expects a pathname, not a file
handle, so this approach will fail. Need to more completely mock python files, which will
have to wait. - 77. By Mike Carifio
-
test/test_Dot.py: follow indentation standard for lists.
- 76. By Mike Carifio
-
test/test_Dot.py: spelling error
- 75. By Mike Carifio
-
Dotdepends/
__init_ _.py: Export class 'Dot'
test/test_Dot.py: Use Dotdepends.Dot directly. - 74. By Mike Carifio
-
Response to LP: #1023564. Starts the unit test process for the Dot object.
- 73. By Mike Carifio
-
Retain templates to seed future unit tests.
Right margin now column 78.
Created a utility method run_dotdepends that abstracts away calling the
dotdepends executable from the tests.
1) line 141-44 (and throughout): style guide niggle: (https:/ /dev.launchpad. net/PythonStyle Guide, section Multiline braces) arg/lists like this:
mydict = {
'first': 1,
'second': 2,
'third': 3,
}
mylist = [
'this is the first line',
'this is the second line',
'this is the third line',
]
Instead of: asdn,asdfadf, adfasdf asdfasdf, asdfsadf)
someting(
asdfadsf,
Note the opening and closing braces have no items/args on their lines. This makes for clearer diffs and less awkward line shortening too.
2) Created by 1023897 to track adding more unit tests to Dot.py as occasion permits us.
3) Can we use "not_a_ package_ 12345" instead of "ima_baddy_ bad_bad_ bad_bad_ ohohoh_ XXXXXX"
3) are you intentinally writing "iff" (instead of "if") in comments many times