Comments (5)
If you run tests from your project, then pep8 need to be installed. If you run tests using description from README.rst, then it will automatically install pep8 when you run bin/buildout
.
It can be fixed by trying to import it in side of test, it will cause test to fail when it's not installed. Or pep8 could be placed inside of setup.py as requirement, then it will be installed when you do setup.py install. What solution will be better ?
from django-moderation.
Well for people who neither use buildout nor used setup.py (like me) to install it, there is currently no recourse.
It seems to me that a test utilizing PEP8 module is unnecessary because:
- The tests should have the same dependencies as the app itself, especially no extra dependencies.
- Tests should be testing for a specific functionality of the app, not to report on something general like PEP8 compliance. It would be like packaging a test to show test coverage. :)
I understand you need to monitor PEP8 compliance, but it's not something integral to the app so it should be a test that lies outside of the tests packaged with the app. It's really only the package distributors' concern whether or not PEP8 compliance is 100%, not the end user's.
from django-moderation.
For some tests i also use for example Mock library. What to do with those tests ? Maybe it will be better to create option skip_moderation_tests
if True then when calling manage.py test
of your project, tests for moderation will not be run. Just like in South
reusable app. http://south.aeracode.org/docs/settings.html#skip-south-tests
I think that testing code for PEP8 is necessary because when writing tests and code, when running tests i can see right a way if new code is PEP8 compatible. It's very useful.
I
from django-moderation.
Of course the tests are needed, but I don't think they need to be bundled with the app if they require many different/extra dependencies. As it stands I cannot run manage test
to completion because the import errors stop it.
With PEP8 for example, you can run external tests on the code before committing it, but an end-user probably doesn't need to verify PEP8-compliance themselves. So something like including a src/tests
folder with the project that you need to run PEP8 and other tests with, but src/moderation/tests
will be free of those kinds of tests that aren't needed by the end user.
from django-moderation.
Fixed imports of test tools used in tests. Now test can be run when tools like: mock, pep8 are not istalled but this tests will not pass until its installed. Closed by f53a3f9
from django-moderation.
Related Issues (20)
- Get rid of `django-model-utils` library HOT 2
- Moderated objects unavailable even with visible_until_rejected = True HOT 1
- Object-specific template and moderator?
- Notifying users | `changed_by` HOT 2
- Django 3.0.6 HOT 1
- Django 3.0
- [Model] matching query does not exist
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
- Can't choose form for ModerationAdmin
- overtaking `_default_manager`
- New release to PyPi HOT 3
- Drop support for unsupported Django versions HOT 3
- New Release HOT 15
- Support for Django 3.2+ HOT 4
- Sites framework is required for using this package HOT 2
- Drop Django 2.2
- Does not work well with proxy classes HOT 1
- Default manager includes rejected objects HOT 2
- Auto Save New
- Object won't auto-approve as superuser
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-moderation.