Skip to content

Commit

Permalink
StraightenWorms needed some testing mods
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Kamentsky committed Sep 7, 2012
1 parent e01892d commit ea465ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cellprofiler/modules/straightenworms.py
Expand Up @@ -476,7 +476,7 @@ def sort_fn(a,b):
def read_params(self, workspace):
'''Read the training params or use the cached value'''
d = self.get_dictionary(workspace.image_set_list)
if hasattr(d, "training_params"):
if "training_params" in d:
return d["training_params"]
params = d["training_params"] = {}
params = read_params(self.training_set_directory,
Expand Down
5 changes: 2 additions & 3 deletions cellprofiler/modules/tests/test_straightenworms.py
Expand Up @@ -172,9 +172,8 @@ def __init__(self):
module.training_set_directory.dir_choice == cps.URL_FOLDER_NAME
module.training_set_directory.custom_path = "http://www.cellprofiler.org"
module.training_set_file_name.value = "TrainingSet.xml"
module.training_params = {
"TrainingSet.xml": ( P(), "URL")
}
module.get_dictionary = lambda dummy: {
"training_params" : P()}

pipeline = cpp.Pipeline()
pipeline.add_module(module)
Expand Down

0 comments on commit ea465ca

Please sign in to comment.