Skip to content

Commit 2bb1dab

Browse files
committed
Small setup updates.
Adding a setup.cfg file Adding pytest support to setup.py
1 parent 0a153f0 commit 2bb1dab

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[pytest]
2+
norecursedirs = .svn .git _build tmp* venv redshift_sqlalchemy
3+

setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
from setuptools import setup
2+
from setuptools.command.test import test as TestCommand
3+
import sys
4+
5+
class PyTest(TestCommand):
6+
def run_tests(self):
7+
import pytest
8+
errno = pytest.main(self.test_args)
9+
sys.exit(errno)
210

311
setup(
412
name='redshift-sqlalchemy',
@@ -11,6 +19,9 @@
1119
url='https://github.com/binarydud/redshift_sqlalchemy',
1220
packages=['redshift_sqlalchemy'],
1321
install_requires=['psycopg2>=2.5', 'SQLAlchemy>=0.8.0'],
22+
tests_require=['pytest>=2.5.2'],
23+
test_suite="tests",
24+
cmdclass = {'test': PyTest},
1425
include_package_data=True,
1526
zip_safe=False,
1627
classifiers=[

0 commit comments

Comments
 (0)