[Test Enhancements] Debug_Print needs a fail-safe. #15
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
zadammac/Tapestry#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
Tapestry's debug_print() function relies upon a global variable, state, which I believe is the master NS reference. This works as intended during runtime, but causes failures during testing under the test-enhance model.
Describe the solution you'd like
Add exception handling to catch the relevant NameError when debug_print() is called outside of its usual context, which will cause the function to simply pass.
Describe alternatives you've considered
Alternatives were to wrap tests known to trigger debug print as child process tasks but this seems to be the far more complex path and introduces performance issues in testing.
Additional context
A one-off test version of Tapestry was packaged with this change and it did not negatively impact performance during normal operation and allowed the new positive_tests package (currently on test-enhance) to complete. The changes were reverted and are not currently committed.
Code that fixes this issue is tested and validated. Because the branch it was fixed in is not yet ready for a move to master, and this issue is not a runtime issue, the 2.0.2 release will be delayed until the release of the full test-enhance branch.