Skip to content

Add CPython import tests#1963

Merged
youknowone merged 16 commits into
RustPython:masterfrom
palaviv:cpython-tests
Jul 18, 2020
Merged

Add CPython import tests#1963
youknowone merged 16 commits into
RustPython:masterfrom
palaviv:cpython-tests

Conversation

@palaviv
Copy link
Copy Markdown
Contributor

@palaviv palaviv commented Jun 12, 2020

No description provided.

@palaviv
Copy link
Copy Markdown
Contributor Author

palaviv commented Jun 14, 2020

Anyone has a mac machine and can help me debug this? Not sure why the tests get stuck...

@jamestwebber
Copy link
Copy Markdown
Contributor

jamestwebber commented Jun 15, 2020

Anyone has a mac machine and can help me debug this? Not sure why the tests get stuck...

I have a Mac, but haven't tried setting up RustPython on it yet...will try that

edit: @palaviv I got it set up relatively quickly (compared to the first time I tried), what do you need to test?

@youknowone
Copy link
Copy Markdown
Member

@jamestwebber reverting this commit would result error 03cc8ee

@jamestwebber
Copy link
Copy Markdown
Contributor

@jamestwebber reverting this commit would result error 03cc8ee

Well this probably isn't helpful but the test passed for me. I'm on this branch but commented out that line.

However, the other tests aren't passing (failed to import selenium), so maybe my setup is not correct.

@youknowone
Copy link
Copy Markdown
Member

youknowone commented Jun 16, 2020

I tested a bit and it seems generatedd relative path actually has problem even out of python.

  • mkdir /var/folders/yf/dvzgtwmx7bsfgfc2d6mcldvh0000gn/T/tmpgsukx1jw success
  • mkdir ../../../../var/folders/yf/dvzgtwmx7bsfgfc2d6mcldvh0000gn/T/tmpgsukx1jw fails

when the upper directory T exists and the same.

I ran the test with this command:
cargo run --release Lib/test/test_py_compile.py -k test_relative_path

When running same test on CPython, the mkdir directory is something like tmpmpse8rrx instead of long ../ chain. So I suspect os.path.relpath is somehow different from CPython.

Because this PR is not about os.path, I suggest to create a new issue for relpath and mark the test as expectedFailure for macOS

@palaviv
Copy link
Copy Markdown
Contributor Author

palaviv commented Jun 26, 2020

@youknowone the test start hanging when I marked the test as skip. How can a test that does not run be a problem?

@youknowone
Copy link
Copy Markdown
Member

I am sorry to be late. I checked out and run this PR, but didn't find any hanging point in local machine.

@youknowone
Copy link
Copy Markdown
Member

probably this is not hanging but just hit the timeout

@youknowone
Copy link
Copy Markdown
Member

By fixing #2007, I now believe the CI problem here also will be fixed by rebasing it over #2010. Would you try rebase it?

@palaviv
Copy link
Copy Markdown
Contributor Author

palaviv commented Jul 18, 2020

By fixing #2007, I now believe the CI problem here also will be fixed by rebasing it over #2010. Would you try rebase it?

Thanks. I will try that.

@youknowone youknowone merged commit 0c11b8b into RustPython:master Jul 18, 2020
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

Successfully merging this pull request may close these issues.

4 participants