浏览代码

Fix a bug in the performance utils

jonathanvdc 8 年之前
父节点
当前提交
a3c76a468e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      performance/utils.py

+ 2 - 1
performance/utils.py

@@ -347,7 +347,8 @@ def define_perf_test(target_class, test_function, optimization_level):
 
 def define_perf_tests(target_class, test_function, optimization_levels=None):
     """Defines performance tests in the given class. Each test calls the given function."""
-    optimization_levels = ALL_OPTIMIZATION_LEVELS
+    if optimization_levels is None:
+        optimization_levels = ALL_OPTIMIZATION_LEVELS
     for opt_level in optimization_levels:
         define_perf_test(target_class, test_function, opt_level)