Skip to content

Conversation

@agronholm
Copy link
Contributor

Mostly cosmetic simplifications and improvements in the testing and packaging setup.
Highlights:

  • Use pytest-cov for test coverage
  • Removed test_requirements.txt in favor of a testing extras (pip install -e .[testing])
  • Added python_requires to packaging metadata
  • Use Pathlib for reading file contents

@Tinche
Copy link
Member

Tinche commented Jul 19, 2017

For the failing test, I suggest making tests/async_fixtures/test_async_gen_fixtures_35.py collectable only for 3.5 (the refactor removed async_generator as a test dependency, which I think is the right move).

@agronholm
Copy link
Contributor Author

No, the accidental removal of async_generator as testing dependency was a mishap. I will add it back. Such generators must be usable from Python 3.6+ and should also be tested that way.

@agronholm agronholm force-pushed the testing_packaging branch from 9623d47 to ff287f4 Compare July 20, 2017 08:55
@Tinche
Copy link
Member

Tinche commented Jul 20, 2017

I'd say 3.6+ should just use normal async generators, no?

@agronholm
Copy link
Contributor Author

And if you're running 3.5 compatible code on 3.6?

@agronholm
Copy link
Contributor Author

Let me rephrase: test code written for 3.5 should be runnable on 3.6 too, and the inclusion of async_generator in the test requirements ensures that the test suite covers this as well.

@Tinche
Copy link
Member

Tinche commented Jul 20, 2017

Right, you have a point. I don't see the harm including it in the test requirements in any case.

@Tinche
Copy link
Member

Tinche commented Jul 20, 2017

One last thing: I see you removed the metadata section from setup.cfg. Is the license file still being included in the wheel? I had an explicit request for this from a downstream repackager.

@agronholm
Copy link
Contributor Author

I see no references to such functionality in setuptools or wheel. Nor have I seen this anywhere else. Can you point me to documentation that says this is a thing?

@Tinche
Copy link
Member

Tinche commented Jul 20, 2017

Right, it's kinda obscure. Here's a link, search for 'metadata' inside: https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/

You can test it out yourself, wheels are zips. The license should be in there after python setup.py bdist_wheel.

@agronholm
Copy link
Contributor Author

Seems like an undocumented option. I'll put it back.

@agronholm agronholm force-pushed the testing_packaging branch from ff287f4 to cd09218 Compare July 20, 2017 22:26
@agronholm
Copy link
Contributor Author

Note that the official wheel documentation says the following:

Older versions of bdist_wheel supported passing requirements in a now-deprecated [metadata] section in setup.cfg.

@Tinche
Copy link
Member

Tinche commented Jul 21, 2017

Thanks!

@Tinche Tinche merged commit 92b34e5 into pytest-dev:master Jul 21, 2017
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.

2 participants