lablup / lablup/backend.ai

add user-defined option in cli integration tests

Open
#1,957 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

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](https://github.com/pytest-dev/pytest/issues/1596)

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

```toml
testpaths = "tests"
markers = [
"integration: Test cases that spawn Dockerized kernel sessions",
]
filterwarnings = [
"ignore::DeprecationWarning:etcd3.*:",
]
asyncio_mode = "auto"
```

~to~

```Java
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](https://docs.pytest.org/en/stable/reference/customize.html#initialization-determining-rootdir-and-configfile)

![https://github.com/lablup/backend.ai/assets/37329424/20f24be4-6fdd-43a9-90be-22ba81625d87](https://github.com/lablup/backend.ai/assets/37329424/20f24be4-6fdd-43a9-90be-22ba81625d87)

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!

JIRA Issue: BA-136

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.