소스 검색

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)