DDF setup plugin doesn't work when using Buildout #25

Closed
michaelmior opened this Issue Mar 28, 2013 · 6 comments

Projects

None yet

3 participants

@michaelmior
Contributor

My project currently uses Buildout and I haven't tested with a virtualenv-based project. But I noticed the DDF setup plugin actually imports the ddf_setup of the DDF setup plugin since django-dynamic-fixture appears first in sys.path.

Not quite sure what the best solution is to this yet.

@michaelmior
Contributor

Perhaps allowing --with-ddf-setup=import.path.for.ddf_setup?

@michaelmior
Contributor

Unfortunately I realized optparse doesn't allow arguments with optional values, so this can't be implemented without breaking existing code.

@paulocheque
Owner

I did not understand completely the problem. But according to your messages, do you think it is possible fixing this change the order manually of the sys.path?

@michaelmior
Contributor

The issue is that my app comes after django-dynamic-fixture in sys.path. Because ddf_setup also exists as a module there, it gets loaded instead of my ddf_setup.py. Ideally there would be a solution which doesn't require changing sys.path. One solution would be to move the ddf_setup and queries plugins into some subfolder for nose plugins.

@yES
yES commented Apr 9, 2014

This is not good idea to name package ddf_setup and trying to import file with same name. When you set NOSE_PLUGINS = ['ddf_setup.DDFSetup', ] django app first trying import my file ddf_setup.py that causes exception: ImproperlyConfigured: Nose plugin module "ddf_setup" does not define a "DDFSetup"
It whould be to set different names for package with plugin and custom file.

@paulocheque
Owner

Amazing feedback yES! I hope we can change this in the future! If you guys have some pull request I will be happy to merge it.

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