backend.ai
backend.ai copied to clipboard
add user-defined option in cli integration tests
while working on
#1778
I ran through error that if --pyargs option comes user defined option gets deleted
And I figured out why!
~~which means we can independently run test using pytest soley!~~
~~in this link it states that conftest.py should be located under folder of testpaths which means we have to fix~~
~~testpaths option under pyproject.toml
~~
~~from~~
testpaths = "tests"
markers = [
"integration: Test cases that spawn Dockerized kernel sessions",
]
filterwarnings = [
"ignore::DeprecationWarning:etcd3.*:",
]
asyncio_mode = "auto"
~~to~~
testpaths = [
"tests",
"src/ai/backend/test"
]
markers = [
"integration: Test cases that spawn Dockerized kernel sessions",
]
filterwarnings = [
"ignore::DeprecationWarning:etcd3.*:",
]
asyncio_mode = "auto"
~~
there was confusion on the way! 😢
it says we have to fix pytest.toml
to add options in pytest. since it search only root dir in pytest
https://github.com/lablup/backend.ai/blob/4762bc890eb966d93cdf03f80268319e8521d14b/tests/common/conftest.py#L12
this code will not work!
So I suggest test code should be kept together on one directory! for future test!