Browse Source

Fix a bug in the performance utils

jonathanvdc 8 years ago
parent
commit
a3c76a468e
1 changed files with 2 additions and 1 deletions
  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)