-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/pip/coverage-7.6.7
- Loading branch information
Showing
6 changed files
with
62 additions
and
7 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
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
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,21 @@ | ||
import os | ||
import shutil | ||
|
||
|
||
def pytest_configure(config): | ||
""" | ||
A pytest hook to customize the terminal summary. | ||
""" | ||
# Get the environment variable | ||
mermaid_server = os.getenv("MERMAID_INK_SERVER", "Not Set") | ||
|
||
mermaid_server = ( | ||
f"\033[92m{mermaid_server}\033[0m" | ||
if mermaid_server != "Not Set" | ||
else "\033[91mNot Set\033[0m" | ||
) | ||
# Print the environment variable at the start | ||
word = " Custom Environment Information " | ||
line = word.center(shutil.get_terminal_size(fallback=(80, 20))[0], "=") | ||
print(f"\033[1m{line}\033[0m") | ||
print(f"\033[92mMERMAID_INK_SERVER \033[0m: {mermaid_server}") |
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