[Test Enhancement] Remove redundant if __name__ == '__main__': statement from parse_config #16
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#16
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.
parse_config(), which itself is called inside a runtime function that is already wrapped in an if name main statement, contains such a statement which prevents most of its functions from executing in a situation where it is not executing as main - for example in the positive_tests.py package currently part of test-enhance.
Describe the solution you'd like
Eliminate the if-name-main check from the function and shift everything behind it one tab to the left.
Describe alternatives you've considered
It might be possible to use some kind of override in the test itself, but this is the more elegant solution.
Additional context
This was tested in an uncommitted dev build of Tapestry and did not immediately appear to have any negative effects. It is required for positive_tests.test_parse_config() to complete successfully.
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.