def METHOD_NAME(self):
    example_model = ExampleModel(path=gettempdir())
    def assign_invalid():
        example_model.path = "not_valid_path!#!#!#"
    self.assertRaises(TraitError, assign_invalid)