Files
deb-python-wsgi-intercept/setup.py
Chris Dent 9d73597f04 Intial stab at context manager based intercepts
See test/test_interceptor for the expect use pattern.

The idea here is that instead of the overrides being visible to the
caller the caller just uses a context manager that surrounds the tests
and that context manager does the right thing.

Those things, at the moment, are exploratory, in an effort to find the
right idiom. The use of classes is intentional, despite icky, to make
overrides and the creation of external subclasses easier.

One thing (of probably several) that remains to be determined is the best
idiom for interception when running a large suite of tests with the same
intercept? What controls the context entry and exit?

Nothing written in stone here, just an exploration. The goals? Two:

* make the external interface simple while allowing lots of changing
  underneath (to bring wsgi-intercept into the future)
* explore options for adding hooks and the like (see #28 for a
  related idea)
2015-12-28 14:22:35 +00:00

47 lines
1.3 KiB
Python

import wsgi_intercept
from setuptools import setup, find_packages
CLASSIFIERS = """
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Topic :: Internet :: WWW/HTTP :: WSGI
Topic :: Software Development :: Testing
""".strip().splitlines()
META = {
'name': 'wsgi_intercept',
'version': wsgi_intercept.__version__,
'author': 'Titus Brown, Kumar McMillan, Chris Dent, Sasha Hart',
'author_email': 'cdent@peermore.com',
'description': 'wsgi_intercept installs a WSGI application in place of a real URI for testing.',
# What will the name be?
'url': 'http://pypi.python.org/pypi/wsgi_intercept',
'long_description': wsgi_intercept.__doc__,
'license': 'MIT License',
'classifiers': CLASSIFIERS,
'packages': find_packages(),
'install_requires': [
'six',
],
'extras_require': {
'testing': [
'pytest>=2.4',
'httplib2',
'requests>=2.0.1',
],
},
}
if __name__ == '__main__':
setup(**META)