Comments (9)
(by ircubic)
from djangorecipe.
(by jvloothuis)
Thanks for reporting this issue with patch. It seems like a valid way to handle your problem.
It would be nice if there was a test to verify this behavior. Would you be willing to take a stab at this?
from djangorecipe.
(by ircubic)
I tried, but was unable to run the tests. mock was complaining about being unable to patch things, think you might have written them for an older version, so I didn't want to rip them up too much. I think you're better suited to writing the actual tests, since you know the code better.
What I did try to write, though, was a test that ran self.recipe.install(), then checked this:
options = develop_install.call_args[0][2]
self.assertEqual(options['setup'], os.path.join(self.parts_dir, 'django'))
where develop_install is a mock of zc.recipe.egg.Develop.install
from djangorecipe.
(by danfairs)
I'm going to take a quick look at this, though I should add that I get the same problem as Daniel Bruce when running the tests with both Mock 0.5.0 and Mock 0.6.0:
(djangorecipe)leafhopper:djangorecipe dan$ bin/test
Test-module import failures:
Module: djangorecipe.tests
Traceback (most recent call last):
File "/Users/dan/.eggs/djangorecipe-0.19.2-py2.6.egg/djangorecipe/tests.py", line 24, in
class TestRecipe(unittest.TestCase):
File "/Users/dan/.eggs/djangorecipe-0.19.2-py2.6.egg/djangorecipe/tests.py", line 110, in TestRecipe
@mock.patch('subprocess', 'Popen')
File "build/bdist.macosx-10.6-universal/egg/mock.py", line 260, in patch
raise TypeError("Need a valid target to patch. You supplied: %r" % (target,))
TypeError: Need a valid target to patch. You supplied: 'subprocess'
from djangorecipe.
(by danfairs)
My bad - the version of mock required is much older, 0.3.1. Sorry for the noise.
from djangorecipe.
(by danfairs)
This patch is the same change to the recipe code, but updates the tests both to test the new behaviour, and to fix up existing tests.
from djangorecipe.
(by ircubic)
Oh wow, great effort, much thanks.
At the time I filed this bug I had no free time at work to actually fix the tests, or I'd have done it myself, I just had to make do with a locally patched copy of the recipe. I've recently picked up Django again, and it's nice to see things are being done to address this. :)
from djangorecipe.
(by reinout)
I'd like a release with this functionality included. Is it planned?
from djangorecipe.
(by roland-micite)
This was released in version 0.20.
from djangorecipe.
Related Issues (20)
- Buildout is pulling package twice HOT 2
- In the django wsgi script, setup_environ is deprecated, should be replaced by os.environ['DJANGO_SETTINGS_MODULE'] HOT 4
- Update Documentation to newest Django version HOT 1
- Project generation HOT 4
- django 1.5: DeprecationWarning: The 'execute_manager' function is deprecated HOT 7
- Add templates for 1.4 and 1.5 for the startproject stuff HOT 2
- Allow custom path to wsgi application HOT 4
- Allow parameter for custom base source directory HOT 5
- How do I run the tests? HOT 3
- django-configurations support requires custom mange.py file HOT 2
- Rename deploy_script_extra to deploy-script-extra HOT 1
- Unable to deploy with recent Gunicorn HOT 11
- Djangorecipe always forces the download of latest packages HOT 8
- Bad assumptions with project and settings options HOT 2
- Deployment settings HOT 4
- Unable to generate project with bin/django startproject projectname HOT 2
- An internal error occurred due to a bug in either zc.buildout or in a recipe being used HOT 2
- djangorecipe cannot install django HOT 1
- uwsgi configuration hints to deploy django build with djangorecipe HOT 3
- Support for Python3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djangorecipe.