mixxorz / behave-django

Behave BDD integration for Django
https://pythonhosted.org/behave-django/
38 stars 5 forks source link

Fixed generating a list of arguments to behave #33

Closed fizista closed 9 years ago

fizista commented 9 years ago

The error which now occurs:

manage.py behave --settings=someapp.somesettings Creating test database for alias 'default'... usage: manage.py [options] [ [DIR|FILE|FILE:LINE] ]+ manage.py: error: unrecognized arguments: --settings=someapp.somesettings

The present code fixes this error. Tests are executed without error.

mixxorz commented 9 years ago

Hey. Thanks a lot for catching this! May I ask what version of Django you're using? I don't seem to have this problem.

fizista commented 9 years ago

I discovered this for these versions of libraries: Django==1.8.2 behave==1.2.5 python 3.3.6

But regardless of the version, this problem should occur.

>>> options = ['--settings=abc']
>>> options.remove('--settings')
ValueError: list.remove(x): x not in list
mixxorz commented 9 years ago

You're right! Thanks for the fix. I'll prep a new release.