-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix test_sdist not finding setup.py or sdist #53
Conversation
* Fix test_packaging:test_sdist to work from the sdist root, as it cannot find setup.py due to cwd=../ being set, assuming the test is being run from the test/ directory. * Fix validating the resulting sdist (.tar.gz), as the path includes a ../, which is incorrect (created in ./dist)
txaio is a helper library for writing code that runs unmodified on both Twisted and asyncio / Trollius. This is like six, but for wrapping over differences between Twisted and asyncio so one can write code that runs unmodified on both (aka source code compatibility). In other words: your users can choose if they want asyncio or Twisted as a dependency. WWW: https://github.com/crossbario/txaio [1] crossbario/txaio#53 PR: 206564 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@407115 35697150-7ecd-e111-bb59-0022644237b5
txaio is a helper library for writing code that runs unmodified on both Twisted and asyncio / Trollius. This is like six, but for wrapping over differences between Twisted and asyncio so one can write code that runs unmodified on both (aka source code compatibility). In other words: your users can choose if they want asyncio or Twisted as a dependency. WWW: https://github.com/crossbario/txaio [1] crossbario/txaio#53 PR: 206564
Does not work: please see Travis. Note that this works flawlessly on FreeBSD - though not using FBSD packages, but plain vanilla Python built from source. |
@oberstet The errors outlined in #53 (comment) are on a FreeBSD system running py.test or python -m pytest in the root dir I'm not sure why the tox run fails, nor why the cwd=.. is needed for it. Edit: It's possible related to the following line in tox.ini:
Which ought not be needed |
I don't know, and as said, I don't use Python system packages on FreeBSD. However, the patch breaks all of our test environments: https://travis-ci.org/crossbario/txaio/builds/104428299 |
txaio is a helper library for writing code that runs unmodified on both Twisted and asyncio / Trollius. This is like six, but for wrapping over differences between Twisted and asyncio so one can write code that runs unmodified on both (aka source code compatibility). In other words: your users can choose if they want asyncio or Twisted as a dependency. WWW: https://github.com/crossbario/txaio [1] crossbario/txaio#53 PR: 206564 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@407115 35697150-7ecd-e111-bb59-0022644237b5
txaio is a helper library for writing code that runs unmodified on both Twisted and asyncio / Trollius. This is like six, but for wrapping over differences between Twisted and asyncio so one can write code that runs unmodified on both (aka source code compatibility). In other words: your users can choose if they want asyncio or Twisted as a dependency. WWW: https://github.com/crossbario/txaio [1] crossbario/txaio#53 PR: 206564 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@407115 35697150-7ecd-e111-bb59-0022644237b5
I can't remember why tox needed it, but all the builders are sad now. Maybe I can setup tox + pytest so that this test only runs on the builders -- and it's not really a great test anyway :/ |
(I added the test because there was a txaio release that missed something from the manifest) |
@meejah The best-practice method is to:
This way the development testing and downstream user/consumer QA testing use-cases are covered. |
Thanks for the "setup.py test" hookup link. Your point 3 do you mean, use "python setup.py test" to run the tests (e.g. instead of invoking py.test)? The real issue with the packaging test is finding the root of the source tree so that |
@meejah Yep re point (3). one could have tox do its own different invocation (directly execute py.test or something else), but there ought to be no reason not to leverage/use it. While the test for packaging doesn't appear to be valuable from a testing point of view, since it is release process specific, there is obvious relevance and value from a CI and test producing release artifacts for development purposes point of view. Having said that, with the changes in this PR, all tests (including the packaging tests) do PASS, since the tests are invoked relative the the sdist root (and not from within test/) That appears to point to a CI (Tox and/or Travis) environment or configuration issue, not a test issue. Resolving this may just be a matter of the packaging tests being aware of, and not being coupled to which location (cwd) they're being invoked from |
I'll ping you on IRC to discuss further, though it's a little disappointed this PR was closed so quickly |
Okay. I basically always run the tests with |
txaio is a helper library for writing code that runs unmodified on both Twisted and asyncio / Trollius. This is like six, but for wrapping over differences between Twisted and asyncio so one can write code that runs unmodified on both (aka source code compatibility). In other words: your users can choose if they want asyncio or Twisted as a dependency. WWW: https://github.com/crossbario/txaio [1] crossbario/txaio#53 PR: 206564
Fix test_packaging:test_sdist which was failing with the following errors running py.test from the sdist root:
Subsequently, test_sdist failed finding the resulting sdist tarball, with the following error:
This change fixes those issues accordingly:
find setup.py due to cwd=../ being set, assuming the test is being run
from the test/ directory.
is incorrect (created in ./dist)