在终端中从VS.bult测试Python中的诅咒

在终端中从VS.bult测试Python中的诅咒,python,visual-studio-2019,Python,Visual Studio 2019,使用VisualStudioCommunity2019V16.5.5,我使用pip安装成功地将curses安装到Python环境中。当我创建以下脚本并从命令(Win10中的Powershell)终端运行它时,它的工作方式与公布的一样 import curses print("Preparing to initialize screen.") screen = curses.initscr() print("Screen initialized") screen.refresh() curse

使用VisualStudioCommunity2019V16.5.5,我使用pip安装成功地将curses安装到Python环境中。当我创建以下脚本并从命令(Win10中的Powershell)终端运行它时,它的工作方式与公布的一样

import curses

print("Preparing to initialize screen.")
screen = curses.initscr()
print("Screen initialized")
screen.refresh()

curses.napms(2000)
curses.endwin()

print("Window ended")
但是,在VS环境中运行时,会出现以下错误:

Preparing to initialize screen.
LINES value must be >= 2 and <= 0: got 1
initscr(): Unable to create SP
Press any key to continue . . .
准备初始化屏幕。

LINES值必须大于等于2,并且只有在使用unittest库通过VS代码运行测试时才会出现此错误。如果我在没有unittest的情况下运行相同的代码,它可以正常工作。