作者查詢 / rebellionyu
作者 rebellionyu 在 PTT [ Python ] 看板的留言(推文), 共14則
限定看板:Python
看板排序:
全部Python14MAC13GuildWars11Liu11creditcard9Linux8FixMyHouse7Key_Mou_Pad7PC_Shopping7Browsers6Digitalhome6ask5iOS5hardware3Japan_Travel3StupidClown3Windows3Broad_Band2DSLR2Gamesale2Gossiping2Headphone2MacDev2Tech_Job2WoodworkDIY2BikerShop1C_and_CPP1MH1mobile-game1MobileComm1MobilePicket1NICUP1Soft_Job1Yunlin1<< 收起看板(34)
首頁
上一頁
1
下一頁
尾頁
5F→: 我剛剛測試了一下,放在tests/unit/test.py,03/20 18:34
6F→: 要用python -m unittest tests.unit.test 跑03/20 18:35
7F→: 而test.py只要from weatherParser import weather03/20 18:35
8F→: 但如果直接跑 python ./tests/unit/test.py 就不行03/20 18:36
9F→: 會說找不到weatherParser這個module03/20 18:36
14F→: 我後來的測試,bot資料夾裡面長這樣03/23 14:46
15F→: http://imgur.com/a/hQ4WV03/23 14:47
16F→: 我在bot資料夾裡,python tests/unit/test_weather_03/23 14:47
17F→: parser.py,而此py檔from ...weather_parser import03/23 14:48
18F→: 會出現此error ValueError: attempted relative03/23 14:49
19F→: import beyond top-level package03/23 14:49
20F→: 照理說我的sys.path應該是 /unit,那我用...weather_03/23 14:49
21F→: parser應該要可以才是…03/23 14:50
4F→: 好,謝謝各位的回答!02/09 12:32
首頁
上一頁
1
下一頁
尾頁