File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
graalpython/com.oracle.graal.python.test/src Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -742,6 +742,11 @@ def test_modules(self):
742
742
def load_conftest (self , testfile ):
743
743
self .load_module (testfile )
744
744
745
+ def trim_traceback (self , tb ):
746
+ if tb and tb .tb_frame .f_code is TestCase .run_safely .__code__ :
747
+ return tb .tb_next
748
+ return tb
749
+
745
750
def run (self ):
746
751
# eval session scope
747
752
eval_scope ("session" )
@@ -783,14 +788,12 @@ def run(self):
783
788
for e in self .exceptions :
784
789
msg , exc = e
785
790
print (msg )
786
- if verbose :
787
- try :
788
- import traceback
789
- traceback .print_exception (type (exc ), exc , exc .__traceback__ )
790
- except Exception :
791
- pass
792
- else :
793
- print (exc )
791
+ try :
792
+ import traceback
793
+ traceback .print_exception (type (exc ), exc , self .trim_traceback (exc .__traceback__ ))
794
+ print ()
795
+ except Exception :
796
+ pass
794
797
795
798
if self .exceptions or self .failed :
796
799
_cleanup_tempdirs ()
You can’t perform that action at this time.
0 commit comments