New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace develop.py with manage.py (using django-app-manage/django-better-test) #3706
Conversation
I'm definitely +1 on retiring |
Well for better or worse, those settings are required to run the tests. (I literally copied them over from The main goal here is to move boilerplate code out of the CMS so others can use it too, and it looks like we agree here. I'm open to suggestions for both app-manage and better-test, though I have to say I'm quite fond of the "explicit" way app-manage handles things (that is, explicitly define settings for your Django app to run). I wanted to go for the most minimal setup with the least magic I could come up with, and I think while there's still some magic there, I'm not sure how to get rid of it. |
@ojii while I'm not fond of having the settings in manage.py, your approach it's really the only sensible one, so I'm +1 |
|
||
|
||
def timed(test_labels): | ||
return _test_run_worker(test_labels, test_runner='cms.test_utils.runners.TimedTestRunner') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will cms.test_utils.runners.TimedTestRunner
be removed as well?
Conflicts: .travis.yml cms/api.py cms/tests/test_api.py cms/tests/test_apphooks.py cms/tests/test_extensions.py cms/tests/test_menu_page_viewperm_staff.py cms/tests/test_nested_plugins.py cms/tests/test_rendering.py cms/tests/test_static_placeholder.py develop.py
fixed INSTALLED_APPS missing an app
Allow --use-tz flag Fix templates config for newer Django
Great work, @ojii. As great as 'develop.py' had been, it was becoming an opaque hairball. Thanks for the general code cleanup along the way too. 👍 |
@ojii apparently there is some conflicts. Are you going to rebase this on top of develop? |
do not merge, tests fail but report as passing. |
Not gonna fix the 2.6 compat issues anymore until https://groups.google.com/forum/#!topic/django-cms-developers/uo9QaTw9m00 has reached a conclusion (after which ideally they won't need fixing anymore) |
@ojii We've announced that v3.2 will be the last version to support Python 2.6. So, if this is going to get into v3.2, it needs to support Django 2.6. |
fine, green now |
@ojii ready for merge? |
@yakky as far as I'm concerned, yes. |
let's go, then |
I think |
@yakky green again |
@ojii @timgraham if no other comments on this, I'll merge it tomorrow |
@yakky not that after 8 months this matters, but why wait till tomorrow? |
@ojii @timgraham As I've seen so much discussion in last few hours and knowing that the interested parties are spread across a few TZs I gave a deadline comfortable enough for everyboy to comment on this, if needed |
@yakky how was your weekend? |
@ojii packed before my journey to zurich :( Forgive me. |
Replace develop.py with manage.py (using django-app-manage/django-better-test)
This Pull Request proposes to remove
develop.py
(and it's related functions incms.test_utils
) with a file calledmanage.py
that can be used like amanage.py
file in a Django project.While
develop.py
works fine, it is a lot of code that has nothing to do with the actual CMS to maintain and it only supports a few commands, new commands need to be added one-by-one. django-app-manage allows to externalize that problem. It's also a project that could be used by 3rd party cms plugins, making testing easier there (this obviously doesn't require this PR to be merged, all this would do is put some weight behind it).develop.py
also set up the magic--parallel
and--isolated
flags for thetest
command, but those flags resulted in odd output. For this, I wrote django-better-test which provides those two flags, but keeps the output nice and tidy.django-better-test also is a lot smarter about distributing the load of the tests (by keeping track of how long each test method takes), has a
--failed
flag to only re-run failed tests, a--retest
flag to re-use the last configuration and more exciting things!TODO:
manage.py
develop.py
cms.test_utils
References
https://github.com/ojii/django-app-manage
https://github.com/ojii/django-better-test