-
Notifications
You must be signed in to change notification settings - Fork 8
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
extend rebuild of pytest to prepend and smart-prepend mode #22
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The checks about appendfilename's default, i.e. to insert a string just prior to the file extension were edited. This aims to provide better portability of the tests when launching pytest either in Linux Debian 13/trixie, or Windows 10. Signed-off-by: Norwid Behrnd <[email protected]>
Documentation about the first set of tests (default append of a string to the file's file name) was updated. Signed-off-by: Norwid Behrnd <[email protected]>
In similar pattern to the first section (append a string), the tests of the second section (to prepend a string to the orginal file name) are revised for better portability on different operating systems. Signed-off-by: Norwid Behrnd <[email protected]>
Documentation about the second set of tests (prepend a string to the original file name of a file) was updated. Signed-off-by: Norwid Behrnd <[email protected]>
Signed-off-by: Norwid Behrnd <[email protected]>
The third section of tests about smartly prepending a string -- i.e. to insert a string right after the time or date stamp -- was edited. Manual tests in Linux Debian and Windows 10 as well as with pytest on either operating system confirm inconsistencies of the format of the file name eventually generated.[1,2] In addition, the implementation differs in robustness to deploy special characters like for instance the underscore as a separator to enclose the string to add. Instead of `_` (as in Debian), Windows tends to enclose these separators with single quotes (`'_'`) instead. The default by `appendfilename` to use a single blank character still is considered "safe to be used" _for `appendfilename`_ though e.g. the underscore would represent a safe alternative if file names with white space are not acceptable. [1] novoid#15 [2] novoid#16 Signed-off-by: Norwid Behrnd <[email protected]>
Previously present labels to check appendfilename's work in either default, prepend, or smart prepend pattern as well as file pytest.ini are reinstalled again. Signed-off-by: Norwid Behrnd <[email protected]>
With pytest labels installed (default, prepend, smart) it will be easier to recognize which sub set contains a failing test. Signed-off-by: Norwid Behrnd <[email protected]>
Signed-off-by: Norwid Behrnd <[email protected]>
Signed-off-by: Norwid Behrnd <[email protected]>
The second and third section of the pytest tests were rewritten to be more portable for either Linux Debian 13, or Windows 10. As confirmed during this revision, the outcome of the optional --smart-prepend mode still depends on the format of the leading time stamp. Second, special characters presumed to provide a file name without a white space (for instance the underscore), though working well in Linux Debian, are not reliably processed in Windows. To facilitate a subsequent refactoring of appendfilename, the corresponding tests already are present, however currently muted. Thirdly, the reinstallment of pytest.ini and labels allows again to address the pytest tests by the name of their set: default, prepend, and smart. Signed-off-by: Norwid Behrnd <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pytest tests now cover again default, prepend, and smart-prepend mode of appendfilename.
The format of the smart-prepend mode depends on the format of the format of the input file submitted. At present, the robustness of processing the separator between the string-to-be-added and the original file name depends on the operating system (Linux Debian better, than Windows). Nevertheless, the commit provides the tests (in place, only muted) to assist a refactoring of appendfilename in future.