-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Allow for adding or removing test file path prefix #495
Conversation
a77b4d0
to
574cb85
Compare
574cb85
to
eb78628
Compare
Test Results (Test Files) 145 files ±0 13 errors 735 suites ±0 2h 12m 37s ⏱️ ±0s For more details on these parsing errors, failures and errors, see this check. Results for commit d9787f8. ± Comparison against base commit 6ddaf27. ♻️ This comment has been updated with latest results. |
# prefix starts either with '+' or '-' | ||
if prefix.startswith('+'): | ||
# add prefix | ||
return "".join([prefix[1:], file]) | ||
|
||
# remove prefix | ||
return file[len(prefix)-1:] if file.startswith(prefix[1:]) else file |
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.
I would flip this to if startsWith(-)
, it'll behave more naturally if someone writes test_file_prefix: /foo
; or make it fail it it doesn't start with [+-]
.
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.
Yes, [+-]
is mandatory (this is now being checked).
Test Results (macOS 11 python installed) 135 files ± 0 135 suites ±0 50m 37s ⏱️ - 3m 6s Results for commit d9787f8. ± Comparison against base commit 6ddaf27. ♻️ This comment has been updated with latest results. |
Test Results (macOS python installed) 135 files ± 0 135 suites ±0 50m 37s ⏱️ - 3m 6s Results for commit d9787f8. ± Comparison against base commit 6ddaf27. ♻️ This comment has been updated with latest results. |
Test Results (Linux python installed) 135 files ± 0 135 suites ±0 50m 37s ⏱️ - 3m 6s Results for commit d9787f8. ± Comparison against base commit 6ddaf27. ♻️ This comment has been updated with latest results. |
Test Results (Linux 20.04 python installed) 135 files ± 0 135 suites ±0 50m 37s ⏱️ - 3m 6s Results for commit d9787f8. ± Comparison against base commit 6ddaf27. ♻️ This comment has been updated with latest results. |
Test Results (Windows python installed) 135 files ± 0 135 suites ±0 50m 37s ⏱️ - 3m 6s Results for commit d9787f8. ± Comparison against base commit 6ddaf27. ♻️ This comment has been updated with latest results. |
Test Results (Windows 2019 python installed) 135 files ± 0 135 suites ±0 50m 37s ⏱️ - 3m 6s Results for commit d9787f8. ± Comparison against base commit 6ddaf27. ♻️ This comment has been updated with latest results. |
eb78628
to
37131e3
Compare
Allows to add or remove a prefix from test file paths to get annotations for test files working.
Fixes #452. Supersedes #482.