python - Python 的 Lettuce 示例出现控制台错误?

标签 python windows-7 lettuce

尝试运行简单的生菜测试场景(来自 here )。我得到这些:

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\registry.py", line 88, in call_hook
    callback(*args, **kw)
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\plugins\colored_shell_output.py", line 91, in pri
nt_step_ran
    width, height = terminal.get_size()
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\terminal.py", line 24, in get_size
    size = get_terminal_size_win()
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\terminal.py", line 43, in get_terminal_size_win
    res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi)
ArgumentError: argument 2: <type 'exceptions.TypeError'>: expected LP_CONSOLE_SCREEN_BUFFER_INFO instance instead of c_c
har_Array_22

Died with argument 2: <type 'exceptions.TypeError'>: expected LP_CONSOLE_SCREEN_BUFFER_INFO instance instead of c_char_A
rray_22
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\__init__.py", line 164, in run
    failfast=self.failfast))
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\core.py", line 1186, in run
    scenarios_ran.extend(scenario.run(ignore_case, failfast=failfast))
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\core.py", line 726, in run
    results.append(run_scenario(self, run_callbacks=True))
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\core.py", line 699, in run_scenario
    all_steps, steps_passed, steps_failed, steps_undefined, reasons_to_fail = Step.run_all(self.steps, outline, run_call
backs, ignore_case, failfast=failfast)
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\core.py", line 472, in run_all
    call_hook('after_each', 'step', step)
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\registry.py", line 88, in call_hook
    callback(*args, **kw)
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\plugins\colored_shell_output.py", line 91, in pri
nt_step_ran
    width, height = terminal.get_size()
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\terminal.py", line 24, in get_size
    size = get_terminal_size_win()
  File "C:\Python27\lib\site-packages\lettuce-0.2.19-py2.7.egg\lettuce\terminal.py", line 43, in get_terminal_size_win
    res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi)
ArgumentError: argument 2: <type 'exceptions.TypeError'>: expected LP_CONSOLE_SCREEN_BUFFER_INFO instance instead of c_c
har_Array_22

我是否缺少一些配置技巧?

最佳答案

lettuce -v [x]

其中 x 可以是 1、2 或 3,并指定显示的有关运行的详细信息量。

在这里找到提示 http://www.erlisvidal.com/2010/10/how-install-lettuce-windows.html

关于python - Python 的 Lettuce 示例出现控制台错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19296532/

相关文章:

python - 使用python的远程PC CPU使用率

python - 用傅里叶分量拟合时间序列 : estimating Fourier series coefficients

python - 返回相似作者的列表

git - 如何在 Windows 7 中使用 git stats

python - 带有生菜和碎片的 Django,打开浏览器但不显示任何内容

java - 如何为 Spark 流检查点设置检查点间隔?

python - Windows 7中的django路径问题

windows-7 - 跨平台 3D (C#)

python - 使用 Lettuce,如何验证从 Django Web 应用程序发送的电子邮件是否具有正确的内容?

java - 如何使用lettuce 4.2 Cluster客户端将复杂的java对象推送到Redis