-
Notifications
You must be signed in to change notification settings - Fork 7
updating test code to current standards #18
Conversation
|
Dingus is still installed, but mock is not (see |
|
The test coverage here has a few holes in it. |
tests/mock_adapter.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing comma
|
There are still a bunch of bare asserts mixed in with |
|
|
Looks like we dislike |
|
It looks like many of the tests could easily be switched to use |
|
There are still backslashes used in files like |
|
So, if we want to bring the tests in line with what we would consider our "modern" codebase, there is a lot more work to be done here than just syntax fixes. The lowest hanging fruit would be things like: But these tests are a mix of broad unit-tests and heavily mocked integration tests. That would have to be fixed... Much of the tests would essentially have to be rewritten. That's likely more work than we want to do? |
|
I'll also mention code coverage again. Instead of saying "install this in a venv" in the |
|
Tests fail locally on on Travis due to import issues. |
|
This will need to be rebased. |
|
This needs to be rebased off of the most version of master. |
update code standards
replace dingus module with mock module.
PPACL-4 remove dingus, add Mock in tox.
remove Dingus and add Mock library.
update code stds for mock_adaptor
updates for code std
updated base tests to match code std
update entry test to code std.
update tdata_dict test code to std.
add correct unittest module
aweber_api/collection.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are either of these methods ever used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
tests/test_aweber_api.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these comments should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
|
i ran pep8, the 2 whitespace checks chris remarked show there. i also ran pylint, and found these errors: Unused variables and arguments: could be ok, just verify that these are a result of a mock, instead of a helper function Docstrings are not required in most test functions, but if you wrote a helper method it should have a docstring. verify that all helper methods have docstrings. miked: I ran pylint and pep 8 on all files. verified that the pertinent warning messages were addressed. |
setup to find functional test dir
update mock_adapter to code std
update code standards for collection
code std update for aweber_api
update code std for aweber_entry
update code std for data_dict
move existing tests to new dir
This is the start of an iteration for updating code to current formatting standards.
Also, replace dingus module with mock module.
Testing:
run in virtualenv
$ python setup.py nosetests