diff --git a/es2panda/test/runner.py b/es2panda/test/runner.py index 76526b230ea4b0e1418446d7723168509dc64146..570e3bf78dce257413d5a95f542af8925db05001 100755 --- a/es2panda/test/runner.py +++ b/es2panda/test/runner.py @@ -25,7 +25,6 @@ import re import subprocess import sys import test262util -import pandas as pd def is_directory(parser, arg): @@ -461,10 +460,13 @@ class Runner: success_list.append(test) if len(fail_list): - test_list = pd.DataFrame(columns=["path", "status", "error", "type"]) + if self.args.error: + import pandas as pd + test_list = pd.DataFrame(columns=["path", "status", "error", "type"]) for test in success_list: suc_col = {"path" : [test.path], "status": ["success"], "error" : ["success"], "type" : ["success"]} - test_list = pd.concat([test_list, pd.DataFrame(suc_col)]) + if self.args.error: + test_list = pd.concat([test_list, pd.DataFrame(suc_col)]) print("Failed tests:") for test in fail_list: print(self.test_path(test.path))