[python-arrayfire] 30/58: Fix standalone tests module.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Sep 28 13:57:06 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository python-arrayfire.

commit 0002f8d0fe01c060cbf5801b7cd9423e97b128e5
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Fri Sep 16 09:56:01 2016 +0100

    Fix standalone tests module.
    
    Gbp-Pq: Name Fix-standalone-tests-module.patch
---
 tests/{simple_tests.py => __init__.py} | 17 -----------------
 tests/__main__.py                      |  4 +++-
 tests/simple_tests.py                  |  4 +++-
 3 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/tests/simple_tests.py b/tests/__init__.py
old mode 100755
new mode 100644
similarity index 53%
copy from tests/simple_tests.py
copy to tests/__init__.py
index 370b162..be76698
--- a/tests/simple_tests.py
+++ b/tests/__init__.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-
 #######################################################
 # Copyright (c) 2015, ArrayFire
 # All rights reserved.
@@ -8,18 +6,3 @@
 # The complete license agreement can be obtained at:
 # http://arrayfire.com/licenses/BSD-3-Clause
 ########################################################
-
-import simple
-import sys
-
-if __name__ == "__main__":
-    verbose = False
-
-    if len(sys.argv) > 1:
-        verbose = int(sys.argv[1])
-
-    test_list = None
-    if len(sys.argv) > 2:
-        test_list = sys.argv[2:]
-
-    simple.tests.run(test_list, verbose)
diff --git a/tests/__main__.py b/tests/__main__.py
index 5b1e473..4683965 100644
--- a/tests/__main__.py
+++ b/tests/__main__.py
@@ -7,8 +7,10 @@
 # http://arrayfire.com/licenses/BSD-3-Clause
 ########################################################
 
+from __future__ import absolute_import
+
 import sys
-from simple_tests import *
+from .simple_tests import *
 
 tests = {}
 tests['simple'] = simple.tests
diff --git a/tests/simple_tests.py b/tests/simple_tests.py
index 370b162..603ae9f 100755
--- a/tests/simple_tests.py
+++ b/tests/simple_tests.py
@@ -9,7 +9,9 @@
 # http://arrayfire.com/licenses/BSD-3-Clause
 ########################################################
 
-import simple
+from __future__ import absolute_import
+
+from . import simple
 import sys
 
 if __name__ == "__main__":

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-arrayfire.git



More information about the debian-science-commits mailing list