#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
+import sys
+from setuptools.command.test import test as TestCommand
+
+# Pytest
+class PyTest(TestCommand):
+ def finalize_options(self):
+ TestCommand.finalize_options(self)
+ self.test_args = ['tests', '--ignore', 'tests/sandbox']
+ self.test_suite = True
+
+ def run_tests(self):
+ #import here, cause outside the eggs aren't loaded
+ import pytest
+ errno = pytest.main(self.test_args)
+ sys.exit(errno)
+
+
CLASSIFIERS = [
'Intended Audience :: Science/Research',
include_package_data = True,
zip_safe = False,
scripts=['scripts/timeside-waveforms', 'scripts/timeside-launch'],
-)
+ tests_require=['pytest'],
+ cmdclass = {'test': PyTest},
+ )