Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add user-defined option in cli integration tests #1957

Open
mirageoasis opened this issue Mar 13, 2024 · 0 comments
Open

add user-defined option in cli integration tests #1957

mirageoasis opened this issue Mar 13, 2024 · 0 comments

Comments

@mirageoasis
Copy link
Collaborator

mirageoasis commented Mar 13, 2024

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

def pytest_addoption(parser):

this code will not work!

So I suggest test code should be kept together on one directory! for future test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant