Repository navigation
[runtime env] use pytest tmp_path, os.path.sep, and unskip most tests for windows - #22342
Conversation
6099c19 to
8358d90
Compare
| def construct(path, excluded=False, depth=0): | ||
| nonlocal item_num | ||
| path.mkdir(parents=True) | ||
| @pytest.mark.skipif(sys.platform == "win32", reason="Fails on windows") |
There was a problem hiding this comment.
Out of curiosity, what's the failure here?
There was a problem hiding this comment.
The test builds a zipfile and then checks that the zipfile matches a directory structure. It fails to compare correctly. I couldn't work out exactly why:
_dir_travel(root, [exclude_spec], handler)
> assert file_paths == visited_file_paths
E AssertionError: assert {('C:\\Users\..., '189'), ...} == {('C:\\Users\..., '873'), ...}
E Extra items in the right set:
E ('C:\\Users\\Matti\\AppData\\Local\\Temp\\pytest-of-Matti\\pytest-30\\test_travel0\\test\\d2a82d2d\\d6f1019f\\ec0710f8\\58bc1d91\\269b1bb0\\25e4388a\\14429db7\\1a513f03\\11108c51', '567')
E ('C:\\Users\\Matti\\AppData\\Local\\Temp\\pytest-of-Matti\\pytest-30\\test_travel0\\test\\d2a82d2d\\d6f1019f\\ec0710f8\\58bc1d91\\269b1bb0\\25e4388a\\471b4ca3\\faf55b19\\492be4f2', '186')
E ('C:\\Users\\Matti\\AppData\\Local\\Temp\\pytest-of-Matti\\pytest-30\\test_travel0\\test\\d2a82d2d\\d6f1019f\\ec0710f8\\58bc1d91\\269b1bb0\\25e4388a\\14429db7\\1a513f03\\950...
E
E ...Full output truncated (94 lines hidden), use '-vv' to show
python\ray\tests\test_runtime_env_packaging.py:332: AssertionError
There was a problem hiding this comment.
I see, thanks for the details! How odd...
There was a problem hiding this comment.
I think leaving this for a future PR makes sense.
|
https://buildkite.com/ray-project/ray-builders-pr/builds/24407#7f55c47f-465a-4f40-9a91-f222715f0718/3219-3295 Just to double check, does this running time look correct compared to running locally? I think it's plausible since it's not starting any Ray clusters. |
|
Mac wheel build flaky on master, and //python/ray/tests:test_basic_2_client_mode flaky on master. |
Yes. Most of the tests are quite fast since they don't actually run |
Why are these changes needed?
Complements #22186 to enable runtime tests on windows. This refactors the tests to use the pytest
tmp_pathfixture, replaces '/' withos.path.sepand unskips almost all the tests on windows. One failing test is still skipped, I propose leaving this for a future PR.Related issue number
Checks
scripts/format.shto lint the changes in this PR.