#13028 closed defect (fixed)
Stop unittest execution if database adapter import fails
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.4 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Mentioned comment:8:ticket:12989, it would be good to stop test execution for all database types when the adapter is not installed. Doing so might require implementing a class that inherits from TestCase or TestSuite.
Attachments (0)
Change History (4)
comment:1 by , 5 years ago
Milestone: | next-major-releases → 1.0.19 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:3 by , 5 years ago
Changes don't work for Python < 2.7. According to docs,
Changed in version 2.7: In earlier versions it was only possible to run individual test methods and not modules or classes.
We could just target changes to trunk: [bdc583b84/rjollos.git]
comment:4 by , 5 years ago
Milestone: | 1.0.19 → 1.4 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Command line options for unittest
module: https://docs.python.org/2/library/unittest.html#command-line-options
Edited TracDev/UnitTests@28.
Committed to trunk in r17088.
Replying to Ryan J Ollos:
I'm not sure this is worth the effort to change the entire codebase in order to implement the check in setUpClass or another setup method. Also, we might benefit from switching to pytest eventually, and the effort might be better spent working on that.
Proposed change is to switch Makefile to use
unittest
module. The-f
(fail fast) option can then be used:This option can also be added to
Makefile.cfg
.Proposed changes: log:rjollos.git:t13028_unittest_database_adapter
DONE Update TracDev/UnitTests.