From 348b82e087596aead4290fa255b4f78ba829db65 2017-05-17 21:22:39 From: Brett Smith Date: 2017-05-17 21:22:39 Subject: [PATCH] .gitignore: setup.py: Integrate pytest to run tests. --- diff --git a/.gitignore b/.gitignore index aadc86cf8ec3c4d02027c9cb431dcd13d318cf0c..35f28a63e77e05c774a00f7b2d1cac6ae6984921 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +*.egg *.egg-info/ +.cache/ __pycache__/ diff --git a/README.rst b/README.rst index cd7436bb9b1d8e3085e2127c8bdfd8d327c18b6f..4299b72a910ba2673af0f30ff6f1fcaeb1eb2393 100644 --- a/README.rst +++ b/README.rst @@ -32,3 +32,8 @@ Here's an example of using the Python library, complete with caching results: if loader.should_cache(): cache_writer.save_rate(hist_rate) # Rates are available from the hist_rates.rates dict. + +Running tests +------------- + +Run `./setup.py test` from your checkout directory. diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..b7e478982ccf9ab1963c74e1084dfccb6e42c583 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[aliases] +test=pytest diff --git a/setup.py b/setup.py index 9ab874203944ae4e12ac84ad676ee605c6802935..32946afcc9df42d8ebc424d7c54863bd632044da 100755 --- a/setup.py +++ b/setup.py @@ -9,6 +9,10 @@ setup( author='Brett Smith', author_email='brettcsmith@brettcsmith.org', license='GNU AGPLv3+', + + setup_requires=['pytest-runner'], + tests_require=['pytest'], + packages=['oxrlib'], entry_points={ 'console_scripts': ['oxrquery = oxrlib.__main__:main'],