backend.ai icon indicating copy to clipboard operation
backend.ai copied to clipboard

add user-defined option in cli integration tests

Open mirageoasis opened this issue 11 months ago • 0 comments

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!~~

Link

~~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! 😢

Link

CleanShot 2024-03-13 at 21 13 41

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!

mirageoasis avatar Mar 13 '24 08:03 mirageoasis