-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Moving tests from test/ to python/ray/tests/ #3950
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
Moving tests from test/ to python/ray/tests/ #3950
Conversation
|
Using this comment to start a discussion on the motivations behind why certain tests were moved and others were not Moved:
Not Moved:
|
|
Looks like it should be |
|
Thanks @williamma12! I think we should actually move all of the tests except |
|
@pcmoritz what do you think? |
|
I agree and we can also rename the "test" directory in the root to "ci" or "integration" something else so it is clear that tests should not go there, but into the new folder instead. |
|
Test FAILed. |
|
Test FAILed. |
|
Sounds good! I've moved all the files from the old I have also updated the folder names from Also, I am open to suggestions for better names for the new |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to utils
|
Test FAILed. |
|
Test FAILed. |
7511514 to
870d4e1
Compare
|
Test FAILed. |
.travis.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think now it's a good chance to follow the test discovery convention (see https://docs.pytest.org/en/latest/goodpractices.html#conventions-for-python-test-discovery) and change these file-based commands to to one single directory-based command (or a few sub-directories if needed).
The benefit is that we can only have one statement in this travis ci file, e.g., pytest -v --duration=10 python/ray/tests. And when someone adds a new test file, they don't need to modify here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Doing so also revealed that the test_queue.py lacked a teardown_module, which I added in #4012.
I notice that there was also a comment about object_manager_test.py and I left it as a separate command but I am open to suggestions
|
Test FAILed. |
.travis.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will run test_object_manager.py twice, right? Maybe we can move the above comment to the test_object_manager.py file, and don't need to make this a separate command. cc @guoyuhong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reworded the comment so that I could keep the comment in .travis.yml and delete the line so test_object_manager.py won't be ran twice
22cbc75 to
cc7de53
Compare
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
python/ray/tests/test_recursion.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@williamma12 does this test actually work in pytest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops good catch. Did not intend to move the remote function inside the test and undoing it made the test pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, can you rename init to ray_start?
|
Test FAILed. |
8317566 to
9da8220
Compare
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
714c73c to
60b8b87
Compare
|
Test FAILed. |
60b8b87 to
df6e0f2
Compare
|
Test FAILed. |
|
There seems to be an issue with |
df6e0f2 to
4f0c5d6
Compare
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
|
Test FAILed. |
3a4483d to
4581216
Compare
|
Test FAILed. |
|
Test FAILed. |
robertnishihara
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once tests pass.
81f759a to
1127d6b
Compare
|
Test FAILed. |
|
Jenkins, retest this please. |
What do these changes do?
Moves relevant python tests to python/ray/test/ so that it will ship with ray when installed from Pypi.
Related issue number