stories icon indicating copy to clipboard operation
stories copied to clipboard

Raise StateError on missed variables.

Open proofit404 opened this issue 4 years ago • 0 comments

People should not use hasattr to set user attribute from three tries. Choice different names for different situations.

  1. Inside story steps.
    def a1s1(self, state):
        state.foo # error
    
  2. Outside of story execution
    state = State()
    state.foo # error
    
  3. hasattr should not work
    hasattr(state, 'foo') # error
    

proofit404 avatar Mar 24 '21 22:03 proofit404