Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
97 views
in Technique[技术] by (71.8m points)

python - How to run a npyscreen (curses) app in Pytest?

I am building a TUI application which I want to run unittests on. I have made a python script which runs the TUI, gives all key inputs, exits and returns the result. The script works perfectly when ran in terminal.

Trying to run it with pytest gives errors, probably because it is not providing a terminal with a "display". Is there any tips for running a curses app in a subprocess and asserting on the stdout or something?

question from:https://stackoverflow.com/questions/65914860/how-to-run-a-npyscreen-curses-app-in-pytest

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...