簡體   English   中英

Py.test搜索

[英]Py.test searching

該命令永遠不會結束,因為它會在一個非常深的大數據目錄中進行搜索:

py.test-完整跟蹤-k my_test_name

stat("/home/conftest.py", 0x7ffff5e6f1a0) = -1 ENOENT (No such file or directory)
stat("/home/foo3_bar_p/conftest.py", 0x7ffff5e6f1a0) = -1 ENOENT (No such file or directory)
stat("/home/foo3_bar_p/archiv/conftest.py", 0x7ffff5e6f1a0) = -1 ENOENT (No such file or directory)
stat("/home/foo3_bar_p/archiv/specialworkflow/conftest.py", 0x7ffff5e6f1a0) = -1 ENOENT (No such file or directory)
stat("/home/foo3_bar_p/archiv/specialworkflow/239/conftest.py", 0x7ffff5e6f1a0) = -1 ENOENT (No such file or directory)
stat("/home/foo3_bar_p/archiv/specialworkflow/239/57x/conftest.py", 0x7ffff5e6f1a0) = -1 ENOENT (No such file or directory)
stat("/home/foo3_bar_p/archiv/specialworkflow/239/75x", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
stat("/home/foo3_bar_p/archiv/specialworkflow/239/75x", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0

/home/foo3_bar_p/archiv/沒有__init__.py文件。 為什么py-test掃描這個大目錄?

因為pytest在測試中不需要__init__.py文件。

如果您不希望它掃描目錄,則將路徑傳遞到pytest,或將其添加到norecursedirs

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM