Open lorylee opened 5 years ago
我对pytest不是很明白,一运行这个脚本就报错,求解答,谢谢
解决了吗?我也是这个问题,很奇怪。
============================= test session starts ============================= platform win32 -- Python 3.6.2, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 rootdir: D:\lc_bs\text-cnn-mastercollected 1 item
text_test.py FLoading test data...
text_test.py:38 (test) def test(): print("Loading test data...") t1=time.time()
x_test,y_test=process_file(config.test_filename,word_to_id,cat_to_id,config.seq_length)
E NameError: name 'config' is not defined
text_test.py:42: NameError [100%]
解决了吗请问
解决了
艾延勇 邮箱:aiyanyong@126.com |
---|
签名由 网易邮箱大师 定制
在2019年05月05日 23:54,Misakiwu 写道:
============================= test session starts ============================= platform win32 -- Python 3.6.2, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 rootdir: D:\lc_bs\text-cnn-mastercollected 1 item
text_test.py FLoading test data...
text_test.py:38 (test) def test(): print("Loading test data...") t1=time.time()
x_test,y_test=process_file(config.test_filename,word_to_id,cat_to_id,config.seq_length)
E NameError: name 'config' is not defined
text_test.py:42: NameError [100%]
解决了吗请问
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
解决了 | | 艾延勇 邮箱:aiyanyong@126.com | 签名由 网易邮箱大师 定制 在2019年05月05日 23:54,Misakiwu 写道: ============================= test session starts ============================= platform win32 -- Python 3.6.2, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 rootdir: D:\lc_bs\text-cnn-mastercollected 1 item text_test.py FLoading test data... text_test.py:38 (test) def test(): print("Loading test data...") t1=time.time() x_test,y_test=process_file(config.test_filename,word_to_id,cat_to_id,config.seq_length) E NameError: name 'config' is not defined text_test.py:42: NameError [100%] 解决了吗请问 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
可以问一下是怎么解决的吗,麻烦了
run的时候默认是启动pytest模式的,在run的config里删除pytest运行该文件,选择直接运行
艾延勇 邮箱:aiyanyong@126.com |
---|
签名由 网易邮箱大师 定制
在2019年05月05日 23:56,Misakiwu 写道:
解决了 | | 艾延勇 邮箱:aiyanyong@126.com | 签名由 网易邮箱大师 定制 在2019年05月05日 23:54,Misakiwu 写道: ============================= test session starts ============================= platform win32 -- Python 3.6.2, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 rootdir: D:\lc_bs\text-cnn-mastercollected 1 item text_test.py FLoading test data... text_test.py:38 (test) def test(): print("Loading test data...") t1=time.time() x_test,y_test=process_file(config.test_filename,word_to_id,cat_to_id,config.seq_length) E NameError: name 'config' is not defined text_test.py:42: NameError [100%] 解决了吗请问 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
可以问一下是怎么解决的吗,麻烦了
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
没太听懂。。。什么是run的config 新手不是太懂,麻烦大大可以解释一下吗
------------------ 原始邮件 ------------------ 发件人: "aiyanyong"notifications@github.com; 发送时间: 2019年5月5日(星期天) 晚上11:59 收件人: "cjymz886/text-cnn"text-cnn@noreply.github.com; 抄送: "溟咩"292312439@qq.com; "Comment"comment@noreply.github.com; 主题: Re: [cjymz886/text-cnn] 运行text_test.py出现错误 (#9)
run的时候默认是启动pytest模式的,在run的config里删除pytest运行该文件,选择直接运行
艾延勇 邮箱:aiyanyong@126.com |
---|
签名由 网易邮箱大师 定制
在2019年05月05日 23:56,Misakiwu 写道:
解决了 | | 艾延勇 邮箱:aiyanyong@126.com | 签名由 网易邮箱大师 定制 在2019年05月05日 23:54,Misakiwu 写道: ============================= test session starts ============================= platform win32 -- Python 3.6.2, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 rootdir: D:\lc_bs\text-cnn-mastercollected 1 item text_test.py FLoading test data... text_test.py:38 (test) def test(): print("Loading test data...") t1=time.time() x_test,y_test=process_file(config.test_filename,word_to_id,cat_to_id,config.seq_length) E NameError: name 'config' is not defined text_test.py:42: NameError [100%] 解决了吗请问 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
可以问一下是怎么解决的吗,麻烦了
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
额给你两个办法,1、把test()函数名改成别的换一个再运行 2、百度搜一下python如何删除在pytest模式下运行
艾延勇 邮箱:aiyanyong@126.com |
---|
签名由 网易邮箱大师 定制
在2019年05月06日 00:02,Misakiwu 写道: 没太听懂。。。什么是run的config 新手不是太懂,麻烦大大可以解释一下吗
------------------ 原始邮件 ------------------ 发件人: "aiyanyong"notifications@github.com; 发送时间: 2019年5月5日(星期天) 晚上11:59 收件人: "cjymz886/text-cnn"text-cnn@noreply.github.com; 抄送: "溟咩"292312439@qq.com; "Comment"comment@noreply.github.com; 主题: Re: [cjymz886/text-cnn] 运行text_test.py出现错误 (#9)
run的时候默认是启动pytest模式的,在run的config里删除pytest运行该文件,选择直接运行
艾延勇 邮箱:aiyanyong@126.com |
---|
签名由 网易邮箱大师 定制
在2019年05月05日 23:56,Misakiwu 写道:
解决了 | | 艾延勇 邮箱:aiyanyong@126.com | 签名由 网易邮箱大师 定制 在2019年05月05日 23:54,Misakiwu 写道: ============================= test session starts ============================= platform win32 -- Python 3.6.2, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 rootdir: D:\lc_bs\text-cnn-mastercollected 1 item text_test.py FLoading test data... text_test.py:38 (test) def test(): print("Loading test data...") t1=time.time() x_test,y_test=process_file(config.test_filename,word_to_id,cat_to_id,config.seq_length) E NameError: name 'config' is not defined text_test.py:42: NameError [100%] 解决了吗请问 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
可以问一下是怎么解决的吗,麻烦了
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
OK,已解决谢谢~------------------ 原始邮件 ------------------ 发件人: "aiyanyong"notifications@github.com 发送时间: 2019年5月6日(星期一) 凌晨0:06 收件人: "cjymz886/text-cnn"text-cnn@noreply.github.com; 抄送: "Misakiwu"292312439@qq.com;"Comment"comment@noreply.github.com; 主题: Re: [cjymz886/text-cnn] 运行text_test.py出现错误 (#9)
额给你两个办法,1、把test()函数名改成别的换一个再运行 2、百度搜一下python如何删除在pytest模式下运行
艾延勇 邮箱:aiyanyong@126.com |
---|
签名由 网易邮箱大师 定制
在2019年05月06日 00:02,Misakiwu 写道: 没太听懂。。。什么是run的config 新手不是太懂,麻烦大大可以解释一下吗
------------------ 原始邮件 ------------------ 发件人: "aiyanyong"notifications@github.com; 发送时间: 2019年5月5日(星期天) 晚上11:59 收件人: "cjymz886/text-cnn"text-cnn@noreply.github.com; 抄送: "溟咩"292312439@qq.com; "Comment"comment@noreply.github.com; 主题: Re: [cjymz886/text-cnn] 运行text_test.py出现错误 (#9)
run的时候默认是启动pytest模式的,在run的config里删除pytest运行该文件,选择直接运行
艾延勇 邮箱:aiyanyong@126.com |
---|
签名由 网易邮箱大师 定制
在2019年05月05日 23:56,Misakiwu 写道:
解决了 | | 艾延勇 邮箱:aiyanyong@126.com | 签名由 网易邮箱大师 定制 在2019年05月05日 23:54,Misakiwu 写道: ============================= test session starts ============================= platform win32 -- Python 3.6.2, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 rootdir: D:\lc_bs\text-cnn-mastercollected 1 item text_test.py FLoading test data... text_test.py:38 (test) def test(): print("Loading test data...") t1=time.time() x_test,y_test=process_file(config.test_filename,word_to_id,cat_to_id,config.seq_length) E NameError: name 'config' is not defined text_test.py:42: NameError [100%] 解决了吗请问 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
可以问一下是怎么解决的吗,麻烦了
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
============================= test session starts ============================= platform win32 -- Python 3.6.2, pytest-4.4.0, py-1.8.0, pluggy-0.9.0 rootdir: D:\lc_bs\text-cnn-mastercollected 1 item
text_test.py FLoading test data...
text_test.py:38 (test) def test(): print("Loading test data...") t1=time.time()
text_test.py:42: NameError [100%]