mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
Improve test-backend output (show module name).
We now show the module name (e.g. "tests or test_hooks") in the test output. This change also eliminates the intermediate use of slashes in the test_name var, which was passed to bounce_key_prefix_for_testing(). (imported from commit 58e73301037a0b07d7e437514c247f7cb559420e)
This commit is contained in:
@@ -24,9 +24,10 @@ def is_known_slow_test(test_method):
|
|||||||
return hasattr(test_method, 'slowness_reason')
|
return hasattr(test_method, 'slowness_reason')
|
||||||
|
|
||||||
def full_test_name(test):
|
def full_test_name(test):
|
||||||
|
test_module = test.__module__
|
||||||
test_class = test.__class__.__name__
|
test_class = test.__class__.__name__
|
||||||
test_method = test._testMethodName
|
test_method = test._testMethodName
|
||||||
return '%s/%s' % (test_class, test_method)
|
return '%s.%s.%s' % (test_module, test_class, test_method)
|
||||||
|
|
||||||
def get_test_method(test):
|
def get_test_method(test):
|
||||||
return getattr(test, test._testMethodName)
|
return getattr(test, test._testMethodName)
|
||||||
@@ -58,7 +59,7 @@ def run_test(test):
|
|||||||
|
|
||||||
bounce_key_prefix_for_testing(test_name)
|
bounce_key_prefix_for_testing(test_name)
|
||||||
|
|
||||||
print 'Running zerver.%s' % (test_name.replace("/", "."),)
|
print 'Running', test_name
|
||||||
test._pre_setup()
|
test._pre_setup()
|
||||||
|
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
|
|||||||
Reference in New Issue
Block a user