-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
# Start the timer using date (in seconds since epoch) | ||
start_time=$(date +%s) | ||
|
||
echo "Files to check: $@" | ||
# Collect unmarked tests for the specific file and suppress errors | ||
unmarked=$(pytest "$@" --collect-only -m "not unit and not regression" -q 2> /dev/null | head -n -2) | ||
|
||
# Count the number of unmarked tests found, ignoring empty lines | ||
num_unmarked=$(echo "$unmarked" | sed '/^\s*$/d' | wc -l) | ||
|
||
# If there are any unmarked tests, print them and exit with status 1 | ||
if [ "$num_unmarked" -gt 0 ]; then | ||
echo "----found unmarked tests----" | ||
echo "$unmarked" | ||
# Calculate the elapsed time and print with a newline | ||
end_time=$(date +%s) | ||
elapsed_time=$((end_time - start_time)) | ||
printf "\nTime taken: %d seconds" "$elapsed_time" | ||
exit 1 | ||
fi |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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