2016-06-28 54 views
0

進出自我測試,並在這樣做我收到幾個故障與實例消息:「全球名稱」分析器'未定義「自檢失敗與python錯誤「全球名稱」解析器'未定義'

我已經爲python安裝了所有軟件包(在Ubuntu上使用2.7版本),並且它僅對失敗的套件的updateTestContent部分進行測試。

有沒有人有任何建議如何解決這個錯誤?

輸出的一個例子是:(但即時得到約30倍的UpdateTestContent測試此確切相同的錯誤)

停止UpdateTestContent test_combinatorial_get_test_content_173616823212099076936397683973588533375(mediaCollection){ID = 「頂部」 ITEMTYPE = 「容器」顯示類型= 「清單」 標題= 「HitsNL TOP30」 canPlay =真canEnumerate =真albumArtURI = 「https://external.unplug.de/img/hitsnl_top_30.png」}

實例的消息:
global name 'parser' is not defined

2016年6月27日16:42:08503 [INFO] SONOS.sonos.workflow.fixture.UpdateTestContent - 測試用例:1 UpdateTestContent test_combinatorial_get_test_content_173616823212099076936397683973588533375

(mediaCollection){ 
    id = "top" 
    itemType = "container" 
    displayType = "list" 
    title = "HitsNL top30" 
    canPlay = True 
    canEnumerate = True 
    albumArtURI = "https://external.unplug.de/img/hitsnl_top_30.png" 
}) 

2016年6月27日16時42分:08,503 [PASS] SONOS.sonos.workflow.fixture.UpdateTestContent - 沒有測試內容需要更新。 (表達式爲真)

2016年6月27日16:42:08503 [STOP] SONOS.sonos.workflow.fixture.UpdateTestContent - 全局名稱 '解析器' 未定義

2016年6月27日16 :42:08503 [STOP] SONOS.sonos.workflow.fixture.UpdateTestContent - 1個UpdateTestContent test_combinatorial_get_test_content_173616823212099076936397683973588533375

2016年6月27日16:42:08504 [DEBUG] SONOS.sonos.workflow.fixture.UpdateTestContent - [(」 ../../sonos-1.1.0.dev_r248336-py2.7.egg/sonos/workflow/fixture.py',2483,'_run_test_iteration','testMethod(factoryTestValues)'),('/ home/zazell /應用程序/ sonos/smapi/content_workflow/updatetestcontent.py',90,'test_combinatorial_ge t_test_content','self.smapiservice。 INIT(self.smapiservice.configfile,parser.wsdl,CRAWLER_DISABLE)')]

2016年6月27日16:42:08504 [INFO] SONOS.sonos.workflow.fixture.UpdateTestContent - - - - - - - - - - - - - - - - - -

2016-06-27 16:42:08,505 [INFO] SONOS.sonos.workflow.result - End test iteration在週一,6月27日測試用例test_combinatorial_get_test_content 0年,2016年下午4時42分

回答

0

我終於加入 來解決這個問題 至初始值 UpdateTestContent類的方法使其正常運行。