This can lead to confusing behavior. For example, in the past, the values of an enum defined in environment.py were not equivalent to themselves when imported from another module.
We should be safe move anything that isn't expected in environment.py into a separate file. The only things that should be in environment.py are the hook functions.
Expected behavior
environment.py should only contain behave hook functions
Current behavior
environment.py contains other code, such as the configuration code for protest specific configuration.
Additional context
This is just code cleanup and not high priority. It does not affect users.
Description of the bug
behave treats
environment.py
in a special way: https://github.com/behave/behave/blob/v1.2.6/behave/runner_util.py#L376This can lead to confusing behavior. For example, in the past, the values of an enum defined in
environment.py
were not equivalent to themselves when imported from another module.We should be safe move anything that isn't expected in
environment.py
into a separate file. The only things that should be inenvironment.py
are the hook functions.Expected behavior
environment.py
should only contain behave hook functionsCurrent behavior
environment.py
contains other code, such as the configuration code forprotest
specific configuration.Additional context
This is just code cleanup and not high priority. It does not affect users.