Project

General

Profile

Task #2852

Updated by Ashlesh Gawande over 9 years ago

Instead of adding a new boolean for each test type, it would probably be better to have an "--experiment $arg" parameter. Then you can look up the $arg in a map containing the corresponding object and instantiate it. 


 ``` 
 e.g.) 
     experiments = {} 
     if experiment is not None: 
         if experiment in experiments: 
             constructor = experiments[experiment] 
             test = constructor(...) 
             test.start() 
         else: 
             ERROR 
 ``` 

Back