def test_disabled_component_is_not_written_to_script(self): self.text = TextComponent(exp=self.exp, parentName='Test Routine') self.text.params['disabled'].val = True self.routine.addComponent(self.text) script = self.exp.writeScript() assert 'visual.TextStim' not in script
def test_disabling_component_does_not_remove_it_from_original_routine(self): self.text = TextComponent(exp=self.exp, parentName='Test Routine') self.text.params['disabled'].val = True self.routine.addComponent(self.text) # This drops the disabled component -- if working correctly, only from # a copy though, leaving the original unchanged! self.exp.writeScript() # Original routine should be unchanged. assert self.text in self.routine
def test_component_is_written_to_script(self): self.text = TextComponent(exp=self.exp, parentName='Test Routine') self.routine.addComponent(self.text) script = self.exp.writeScript() assert 'visual.TextStim' in script
def test_component_not_disabled_by_default(self): self.text = TextComponent(exp=self.exp, parentName='Test Routine') assert self.text.params['disabled'].val is False