Replies: 2 comments
-
appears this might be a Click thing :-/
test_main.py
|
Beta Was this translation helpful? Give feedback.
-
Your original example results in a
Can you show the code you're actually running? Because evidently you're not running the code you posted. As for your Click example, this is what I'd expect to happen, and it's not related to either Python nor Click. Decorators are run by Python when your module is imported, thus |
Beta Was this translation helpful? Give feedback.
-
First Check
Commit to Help
Example Code
Description
The above
main.py
prints the absence of a tty when run without oneThe second test in
test_main.py
fails. this is a typer issue asassert sys.stdout.isatty()
passes but doesn't returnTrue
in the applicationOperating System
Linux, macOS
Operating System Details
same issue on Linux w/ Python 3.11
Typer Version
0.9.0
Python Version
Python 3.7.12
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions