feat: erc721 test with screen and path argument for binary

This commit is contained in:
Coline
2022-06-28 10:37:07 +02:00
parent 45a054de09
commit 52769eb522
19 changed files with 188 additions and 8 deletions

View File

@@ -14,15 +14,18 @@ VERSION = {"nanos": "2.1", "nanox": "2.0.2", "nanosp": "1.0"}
def pytest_addoption(parser):
# nanos or nanox
# nanos, nanox, nanosp
parser.addoption("--model", action="store", default="nanos")
# qt: default, requires a X server
# headless: nothing is displayed
parser.addoption("--display", action="store", default="qt")
path: str = SCRIPT_DIR.parent.parent / "bin" / "app.elf"
parser.addoption("--path", action="store", default=path)
@pytest.fixture()
def client(pytestconfig):
file_path = SCRIPT_DIR.parent.parent / "bin" / "app.elf"
file_path = pytestconfig.getoption("path")
model = pytestconfig.getoption("model")
args = ['--log-level', 'speculos:DEBUG','--model', model, '--display', pytestconfig.getoption("display"), '--sdk', VERSION[model]]