From 4d45f11a08d26a97622a7cfd4a224681a65c176a Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 19 Sep 2015 17:06:50 +0700 Subject: [PATCH] regress/regress.py can be run from inside regress/ --- regress/regress.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 regress/regress.py diff --git a/regress/regress.py b/regress/regress.py old mode 100644 new mode 100755 index 89aeef65..2e4f2536 --- a/regress/regress.py +++ b/regress/regress.py @@ -1,3 +1,5 @@ +#!/usr/bin/python + import unittest from os.path import dirname, basename, isfile @@ -12,7 +14,10 @@ def main(): unittest.main() if __name__ == '__main__': - modules = glob.glob(dirname(__file__)+"./*.py") + directory = dirname(__file__) + if directory == '': + directory = '.' + modules = glob.glob(directory+"/*.py") __all__ = [ basename(f)[:-3] for f in modules if isfile(f)] suite = unittest.TestSuite()