[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pytest



Hello,

If you look at the djangorestframework git repository, it is failing to
build due to tests failing.

I incorrectly filed a bug report upstream about this:
https://github.com/tomchristie/django-rest-framework/issues/3524

Upstream correctly pointed out that the test class is decorated by the
skipif decorator, which should skip the entire test because we have
Django 1.7 still in the archive:

@pytest.mark.skipif(django.VERSION < (1, 8),                                     
                    reason='DurationField is only available for django1.8+')

However this is not working, it is not skipping the test.

My latest theory is that running the tests using debian/run_tests.py
using django.test.utils.get_runner somehow is incompatable with or
breaks pytest.mark.skipif - not really sure I understand.

So I thought I could use the upstreams ./runtests.py - this however does
not seem to initialize Django properly (it works when called by tox, not
sure what the difference is).

So what is going wrong, and what is the solution?

Thanks
-- 
Brian May <bam@debian.org>


Reply to: