canonical / ubuntu-pro-client

Ubuntu Pro Client for offerings from Canonical
https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/
GNU General Public License v3.0
52 stars 69 forks source link

Bug: features/environment.py has functionality unrelated to what behave looks for #3067

Open orndorffgrant opened 3 months ago

orndorffgrant commented 3 months ago

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#L376

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.