-
Notifications
You must be signed in to change notification settings - Fork 6
Enhancement unit testing #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement unit testing #78
Conversation
- Enhancement: update coverage report - branch coverage, precision, and show missing coverage lines - Enhancement: Update testing on `stackinabox.stack` for full explicit testing without using the global instance for all tests
- Refactor: Move the Stack-In-A-Box exceptions to their own module these are all internal so should not affect users - Refactor: Move the Stack-In-A-Box router to its own module, this is internal so should not affect users - Bug Fix: add the `about` page to the toctree for the docs - Bug Fix: pycodestyle fixes
- Enhancement: 93% coverage requirement - Enhancement: Promote the `process_service` functionality to a class method so it can be properly tested - Refactor: Move the `RequestMockCallable` to its own module within the requests-mock support to help clarify testing - Bug Fix: requests-mock support had a bad variable name in the session support. - Enhancement: Added more unit tests, catching several latent bugs
- Enhancement: Complete testing of the StackInABoxService - Enhancement: 95% test coverage
- Bug Fix: RequestMockCallable moved to a sub-module in a refactor
- Refactor: HelloService is just an example; it doesn't need to be part of stackinabox proper. Moved it over to the test suite.
Refactor: setup each module layer with its own TestCase and base interface so each can be more specialized.
- Enhancement: Use a specific Exception instead of using a straight assert that causes a general AssertionError use a specific Exception class for when the router detects a circular reference being made in the routes. - Enhancement: full test coverage of the StackInABoxRouter
- updated dependencies - fixed some code style issues - fixed an issue where the log message reported a pattern object instead of the pattern being looked at, making it hard to debug - added a test of the request-mock callable; one of the tests presently fails (marked as an expected failure) for an unknown reason.
| def test_handler_other_body(self, mock_call_into): | ||
| # For some reason the returned response isn't providing | ||
| # the expected body. For now, marking as an expected | ||
| # failure but this needs to be fixed. |
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.
Reading through this PR, this bug was there prior just not being tested. This reveals an issue as it introduced a unit test that exposed it. Not sure where it is but allowing through for now. We'll need to address it.
|
Note: 2 of the builds failed (pypy, py35); this is acceptable for now as this is one of the last on travis-ci and those builds will be going away with the new CI environment any way. |
Working through the unit testing to improve test coverage
stackinabox.stack,stackinabox.services.service,stackinabox.util.*stackinabox.util.*modules for better testabilitystackinabox.util.request_mocksupport (local_sessionvslocal_sessions)stackinabox.services:Note: This converts some functionality that was indirectly tested to being directly tested. Direct tests are far better and help make the code coverage metric more meaningful. However, code coverage tooling doesn't have a good way to validate direct test coverage.
Working towards closing Issue #71