diff --git a/cxotime/__init__.py b/cxotime/__init__.py index 4ea5cb2..3b5b7e3 100644 --- a/cxotime/__init__.py +++ b/cxotime/__init__.py @@ -1,3 +1,11 @@ from .cxotime import CxoTime -__version__ = '0.1' +__version__ = '3.1' + + +def test(*args, **kwargs): + ''' + Run py.test unit tests. + ''' + import testr + return testr.test(*args, **kwargs) diff --git a/setup.py b/setup.py index 2020a55..de4d037 100644 --- a/setup.py +++ b/setup.py @@ -2,10 +2,18 @@ from cxotime import __version__ +try: + from testr.setup_helper import cmdclass +except ImportError: + cmdclass = {} + setup(name='cxotime', author='Tom Aldcroft', description='Chandra Time class base on astropy Time', author_email='taldcroft@cfa.harvard.edu', version=__version__, - packages=['cxotime'], + zip_safe=False, + packages=['cxotime', 'cxotime.tests'], + tests_require=['pytest'], + cmdclass=cmdclass, )