Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 无法在OpenERP 6.0.4中触发AssertionError_Python_Python 2.7_Openerp - Fatal编程技术网

Python 无法在OpenERP 6.0.4中触发AssertionError

Python 无法在OpenERP 6.0.4中触发AssertionError,python,python-2.7,openerp,Python,Python 2.7,Openerp,我正在使用OpenERP6.0.4并尝试使用assert assert False, "This message should prompt out" 但这并没有被调用,我已经尝试了openerp服务器断言退出级别中的所有模式 这只发生在Windows中,当我在Ubuntu中尝试它时,它工作得很好,我应该怎么做才能启用断言?谢谢断言为True,“此消息应提示” 尝试将False更改为True,基于Linux的操作系统和windows在布尔计算方面存在一些差异它也不起作用,但当我在windows

我正在使用OpenERP6.0.4并尝试使用assert

assert False, "This message should prompt out"
但这并没有被调用,我已经尝试了openerp服务器断言退出级别中的所有模式

这只发生在Windows中,当我在Ubuntu中尝试它时,它工作得很好,我应该怎么做才能启用断言?谢谢

断言为True,“此消息应提示”


尝试将False更改为True,基于Linux的操作系统和windows在布尔计算方面存在一些差异

它也不起作用,但当我在windows中使用python控制台并使用该代码行时,断言者错误提示windows中的python控制台将像Linux控制台一样计算,但在windows中不会。这个怎么样?断言1,“此消息应提示输出”要执行此操作,您必须将strict option设置为False您指的是哪个strict option?仅供参考,assert关键字在版本1.5中引入。确保windows运行时环境处于此版本