From 4c975b4d2e7d5c63d940ebf11dab15e846c97175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim Rühsen?= Date: Fri, 8 Apr 2016 16:31:08 +0200 Subject: [PATCH 2/3] Use test file name as TEST_NAME * testenv/test/base_test.py (__init__): Use test file name for name --- testenv/test/base_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testenv/test/base_test.py b/testenv/test/base_test.py index 9bb4151..82310b1 100644 --- a/testenv/test/base_test.py +++ b/testenv/test/base_test.py @@ -4,6 +4,7 @@ import shlex import traceback import re import time +import sys from subprocess import call from misc.colour_terminal import print_red, print_blue from exc.test_failed import TestFailed @@ -27,7 +28,7 @@ class BaseTest: Define the class-wide variables (or attributes). Attributes should not be defined outside __init__. """ - self.name = name + self.name = os.path.basename(os.path.realpath(sys.argv[0])) # if pre_hook == None, then {} (an empty dict object) is passed to # self.pre_configs self.pre_configs = pre_hook or {} -- 2.8.0.rc3