Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin options not working since 1.4.4 #287

Open
X-Trade opened this issue Sep 18, 2017 · 0 comments
Open

plugin options not working since 1.4.4 #287

X-Trade opened this issue Sep 18, 2017 · 0 comments

Comments

@X-Trade
Copy link

X-Trade commented Sep 18, 2017

I have a simple plugin that looks like this:

class UnitTestsSelectionPlugin(Plugin):
    enabled = True
    include_integration = False

    def options(self, parser, env):
        Plugin.options(self, parser, env)
        parser.add_option('--with-integration', action='store_true',
                          dest='include_integration', default=False,
                          help="Run integration tests alongside unit tests")

    def configure(self, options, conf):
        Plugin.configure(self, options, conf)
        self.include_integration = getattr(options, "include_integration",
                                           False)

This worked up to 1.4.3, but in 1.4.4 and 1.4.5 django test returns:

Usage: ./bin/django test [options] [path.to.modulename|path.to.modulename.TestCase|path.to.modulename.TestCase.test_method]...

Discover and run tests in the specified modules or the current directory.
./bin/django: error: no such option: --with-integration

I have checked that the plugin is properly installed and determined with crude prints that the configure and options methods are being called. Rolling back to an older version of django-nose fixes the problem.

The plugin was pretty much just lifted from the nose documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant