如何導入或以其他方式綁定pytest燈具以供交互使用,而不使用斷點? 例如,我想了解REPL中的tmpdir_factory夾具的一些行爲。 from pytest import tmpdir_factory # note: this doesn't actually work
# setup/context has already been entered
tmpdir_factory.e
我正在編寫一些測試,依靠用戶輸入來決定它們是否已通過。 我有這樣的功能: def viewable(actual_proj):
print("\nCan you see %s projects named:\n"%len(actual_proj))
for i in actual_proj:
print (i+"\n")
return input("(y/
方法 house.py: class House:
def is_habitable(self):
return True
def is_on_the_ground(self):
return True
conftest.py: import pytest
from house import House
@pytest.fixture(sc