Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Weird testing pattern. #23

Open
GoogleCodeExporter opened this issue May 5, 2015 · 1 comment
Open

Weird testing pattern. #23

GoogleCodeExporter opened this issue May 5, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

While it's nice to have the `test` command directly available, I would much 
prefer to have test available as an option with possible dependencies such as 
`nosetest` and `coverage`. Overwriting method with `pass` as is currently the 
case is not best practice.

Regarding the tests themselves: unit tests should test individual methods and 
functions in isolation where possible with additional tests for different code 
paths. Currently _InnerAppendData has no test coverage and AppendData contains 
not only tests for different code paths into the method but also for detecting 
exceptions that will be raised by _InnerAppendData. I will submit a patch both 
for testing and for the setup.

Original issue reported on code.google.com by charlie....@clark-consulting.eu on 6 May 2012 at 9:21

@GoogleCodeExporter
Copy link
Author

For #22 I've done some refactoring a couple of notes:

* there should be at least one test method for every module method, more for 
different code paths

* assertEqual(None, method(*args)) is not a test that a method ran correctly if 
the method does not return anything

* methods that do not themselves raise or propagate exception should not be 
tested for it

Original comment by charlie....@clark-consulting.eu on 7 May 2012 at 7:00

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant