Skip to content
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

Integrate py.test enabling python setup.py test #678

Merged
merged 4 commits into from Feb 25, 2014
Merged

Integrate py.test enabling python setup.py test #678

merged 4 commits into from Feb 25, 2014

Conversation

koobs
Copy link
Contributor

@koobs koobs commented Feb 24, 2014

Integrate py.test according to: https://pytest.org/latest/goodpractises.html#integration-with-setuptools-test-commands

Enables use of standard python setup.py test command.

Very handy for OS packagers & porters for QA, in this case the FreeBSD Port for cryptography which just landed.

@jenkins-cryptography
Copy link

Can one of the admins verify this patch?

self.test_args = []
self.test_suite = True
def run_tests(self):
#import here, cause outside the eggs aren't loaded
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full sentences please. e.g. # Import here because in module scope the eggs are not loaded.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied verbatim from the py.test integration notes, but acknowledged.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 4747742 on koobs:patch-1 into 2d4f36a on pyca:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 23b5df7 on koobs:patch-1 into 2d4f36a on pyca:master.

@alex
Copy link
Member

alex commented Feb 24, 2014

@dstufft anything we should know about whether setup.py test is the worst thing in the world?

@reaperhulk
Copy link
Member

ok to test

@jenkins-cryptography
Copy link

Test PASSed.
Refer to this link for build results: http://jenkins.cryptography.io/job/cryptography-pr-experimental/853/

@dstufft
Copy link
Member

dstufft commented Feb 24, 2014

setup.py test is ok. You'll be installing test dependencies using setuptools but that's not super horrible.

@reaperhulk
Copy link
Member

I'm mildly concerned that we're adding a new test_requirements that is similar (but not identical since it doesn't include coverage) to the deps in our tox.ini. Is there some way we can prevent duplication here? Since we don't run our CI tests via python setup.py test it's possible that this could break on dependency changes without us noticing.

@dstufft
Copy link
Member

dstufft commented Feb 24, 2014

Typically what I do is:

setup.py:

testing_reqs = ["coverage", "pytest"]

setup(
    test_requires=testing_reqs,
    extras_require={
        "test": testing_reqs,
    },
)

Then we'd need to figure out what the right magic is to get tox to isntall the test extra which I'm not sure offhand.

@alex
Copy link
Member

alex commented Feb 25, 2014

There's a merge conflict now, can you merge/rebase master in?

Integrate py.test according to: https://pytest.org/latest/goodpractises.html#integration-with-setuptools-test-commands

Enables use of standard python setup.py test command. 

Very handy for OS packagers & porters for QA, in this case the FreeBSD Port for cryptography which just landed.
@Ivoz
Copy link
Contributor

Ivoz commented Feb 25, 2014

@koobs
Copy link
Contributor Author

koobs commented Feb 25, 2014

SHIP ITTTTTTTTT

Edit: might wait for Travis to say so first tho

@jenkins-cryptography
Copy link

Test PASSed.
Refer to this link for build results: http://jenkins.cryptography.io/job/cryptography-pr-experimental/867/

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 0667180 on koobs:patch-1 into dae8795 on pyca:master.

@koobs
Copy link
Contributor Author

koobs commented Feb 25, 2014

Docs build failure due to:

(line   59) broken    https://www.schneier.com/code/vectors.txt - <urlopen error [Errno 61] Connection refused>

Wait until this resolves itself for a pass, or ship it?

Jenkins refers Test PASSed.

koobs added a commit to freebsd/freebsd-ports that referenced this pull request Feb 25, 2014
- Backport python setup.py test integration PR [1]
- Add OpenSSL as a dependency (Was py-openssl dependency)
- Add TEST_DEPENDS and regression-test: target

[1] pyca/cryptography#678
@Ivoz
Copy link
Contributor

Ivoz commented Feb 25, 2014

the vectors.txt link was just down. It sucks depending on so many online urls just for the build to pass

alex added a commit that referenced this pull request Feb 25, 2014
Integrate py.test enabling `python setup.py test`
@alex alex merged commit eaf9a80 into pyca:master Feb 25, 2014
tota pushed a commit to tota/freebsd-ports that referenced this pull request Feb 28, 2014
- Backport python setup.py test integration PR [1]
- Add OpenSSL as a dependency (Was py-openssl dependency)
- Add TEST_DEPENDS and regression-test: target

[1] pyca/cryptography#678


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@345962 35697150-7ecd-e111-bb59-0022644237b5
@koobs koobs deleted the patch-1 branch July 1, 2014 04:46
koobs added a commit to freebsd/freebsd-ports that referenced this pull request Jul 1, 2014
splbio pushed a commit to splbio/freebsd-ports that referenced this pull request Nov 24, 2014
- Update to 0.4
- Remove setup.py patch (Upstreamed [1])

Changes:

  * https://github.com/pyca/cryptography/blob/0.4/CHANGELOG.rst

[1] pyca/cryptography#678


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@359958 35697150-7ecd-e111-bb59-0022644237b5
joerichter-stash pushed a commit to kiwigrid/cryptography that referenced this pull request Nov 15, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

8 participants