areski / django-nvd3

Django wrapper for nvd3 - It's time for beautiful charts
Other
416 stars 124 forks source link

Organize tests and test custom css js dirs #65

Closed lgp171188 closed 8 years ago

lgp171188 commented 8 years ago

This pull request organizes the tests into a separate tests module and integrates the them with setup.py so that the tests can be run using python setup.py test.

The packages required for running the tests are listed in test_requirements.txt and included in the tests_require option of setup.py

areski commented 8 years ago

Best contribution I saw to the project in a very long time, thanks for that!

areski commented 8 years ago

Hi @lgp171188 The tests are failing at https://github.com/areski/django-nvd3/blob/develop/tests/test_template_tags.py#L50 with Django 1.9, any idea how to solve this?

lgp171188 commented 8 years ago

Looks like some issue with the getting Django ready before running that code. Will check and get back with a fix.

lgp171188 commented 8 years ago

@areski Please review the fix and merge it if it is okay - https://github.com/areski/django-nvd3/pull/71

areski commented 8 years ago

Thanks I merged #71 but it doesnt seems to fix the initial problem

lgp171188 commented 8 years ago

@areski I see that the Python 3.3 build fails (https://travis-ci.org/areski/django-nvd3/jobs/96027438) when trying to load the tests. Will try to debug what the issue is. But Django 1.9 doesn't support Python 3.3. So I'm not sure if it can be fixed.

areski commented 8 years ago

ok great, I should have checked the details! Thanks a lot for your fix!

On Thu, Dec 10, 2015 at 2:27 PM, Guruprasad notifications@github.com wrote:

@areski https://github.com/areski I see that the Python 3.3 build fails (https://travis-ci.org/areski/django-nvd3/jobs/96027438) when trying to load the tests. Will try to debug what the issue is. But Django 1.9 doesn't support Python 3.3. So I'm not sure if it can be fixed.

— Reply to this email directly or view it on GitHub https://github.com/areski/django-nvd3/pull/65#issuecomment-163614094.

Kind regards, /Areski


Arezqui Belaid, areski@gmail.com Founder at Star2Billing (www.star2billing.com)

Tel: +34650784355 Twitter: http://twitter.com/areskib LinkedIn: http://www.linkedin.com/in/areski

lgp171188 commented 8 years ago

@areski I debugged the issue and found that Django 1.9 uses some new features added in Python 3.4 (since 3.3 is no longer supported) which breaks the way tests are imported. I can confirm that the tests on Python 3.3 with Django 1.8.7 pass.

areski commented 8 years ago

Thanks I just remove py3.3 support in travis! :+1:

lgp171188 commented 8 years ago

@areski In case you want to keep Python 3.3 for testing Django 1.8.x which is the LTS release and is supported for a long time, pull request https://github.com/areski/django-nvd3/pull/72. If you don't want to ensure that django-nvd3 works on Django 1.8.x, then it is fine :)

areski commented 8 years ago

you convinced me with the LTS ;)