Source

RIL / setup.py

Diff from to

File setup.py

 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-from distutils.core import setup
+from distutils.core import setup, Command
+
+
+class PyTest(Command):
+    user_options = []
+
+    def initialize_options(self):
+        pass
+
+    def finalize_options(self):
+        pass
+
+    def run(self):
+        import sys
+        import subprocess
+
+        errno = subprocess.call([
+            sys.executable, './tests/test_readitlater.py', ])
+        raise SystemExit(errno)
 
 
 setup(
     url='https://bitbucket.org/Surgo/ril/',
     download_url='https://bitbucket.org/Surgo/ril/downloads',
     description='Pocket (Formerly ReadItLater) library for Python.',
+    cmdclass={
+        'test': PyTest,
+    },
     license='BSD',
     packages=[
         'readitlater',