Comments (8)
I poked around and we can "cheat" and do:
import django_nose.management
That's a no-op __init__.py
, so it doesn't import anything.
from django-nose.
That's what I tried, and it didn't work for me because it's still going through django_nose/__init__.py
here.
from django-nose.
Oh, bah. I see what you're getting at.
from django-nose.
Boy, that's a tough one. I can't really remove the imports from __init__
until 2.0, because that's been the public API to this point. Hmm.
from django-nose.
What we ended up doing was a goofy assumption where if they have nose installed, then we add django-nose to the INSTALLED_APPS list. That'll do for now, though it does have some edge cases.
from django-nose.
imp.find_module('django_nose')
(you have to import imp)
This raises ImportError if the module or package is not on the path, but doesn't actually import it if it is there.
(If it's a module, the first element of the tuple returned will be an open file object for the file. If it's a package, that first element will be None. You should probably close the file if there is one.)
from django-nose.
Good call! Let me know if that wouldn't have worked for you, @willkg.
from django-nose.
That works super. Thanks!
from django-nose.
Related Issues (20)
- --cover-inclusive causes Failure: RuntimeError (Model class project.app.models.MyModel doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.)
- AttributeError: type object 'BaseCommand' has no attribute 'option_list' HOT 1
- Django 2.2: AttributeError: type object '_TestState' has no attribute 'saved_data'
- Remove me as PyPI owner HOT 2
- Implement Jazzband guidelines for project django-nose HOT 3
- Django 1.11 test coverage for models returning JSON object error HOT 1
- Tests failing only when using django-nose and Django 2.X HOT 9
- Run Unit Tests before Integration Tests
- Add django-nose and nose status to the README HOT 2
- Release new version(s) to PyPi HOT 4
- Add support for pre-release and development versions
- Add nose2 support
- Test and update fixture loading, in MySQL and other engines
- Adopt tox-travis HOT 1
- coverage xml isn't created HOT 1
- django-nose cannot find any test HOT 1
- Why still maintain this package? HOT 1
- Django 3.1: TypeError: sql_flush() takes 3 positional arguments but 4 were given
- Python 3.11 support HOT 3
- Maintainers Needed HOT 3
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 django-nose.