From 707b30749daf407c07b5b265bd892564576ad80a Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 31 May 2010 17:53:10 +0200 Subject: [PATCH] use setup.py test. This fixes #56 --- Makefile | 2 +- setup.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b46bb3b5..4b1d8081 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ all: clean-pyc test test: - python tests/flask_tests.py + python setup.py test release: python setup.py release sdist upload diff --git a/setup.py b/setup.py index 66ef6a66..96fc77ba 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,13 @@ Links from setuptools import setup +def run_tests(): + import os, sys + sys.path.append(os.path.join(os.path.dirname(__file__), 'tests')) + from flask_tests import suite + return suite() + + setup( name='Flask', version='0.4', @@ -67,5 +74,6 @@ setup( 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' - ] + ], + test_suite='__main__.run_tests' )