Skip to content

settings_envvar and OptionParser behave differently #15

Description

@dmr

With

def main(): run_app(settings_initializer='MY_CONF', ...)

When I call

MY_CONF="my.py" my test --stop

everything works fine but with

my --config=my.py test --stop

I get a no option "--stop" error. (I'm using the nose test runner)

Is that behavior expected?

Can the --config option be removed?
The settings_envvar could be assumed to be there on start and that would also provide another benefit:
When I initialize a new project I had to look into the code until I realized that "my init" required another parameter: the default config path --> If the settings_envvar would be required the error would be more clear I think.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions