From 269b28623e51ac62ad1d163fbb1f6dffa5a80035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Ga=C5=82uszka?= Date: Tue, 15 Jul 2014 16:02:24 +0200 Subject: [PATCH] Added back support for 1.4 django and implementing the suggestion from @dgreisen-cfpb --- .travis.yml | 7 +++++-- django_behave/runner.py | 7 ++++++- requirements.txt | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a9e3de..ccedf58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,14 +2,17 @@ language: python python: - "2.6" - "2.7" + - "3.3" + - "3.4" env: - DJANGO=1.4 - DJANGO=1.5 - DJANGO=1.6 + - DJANGO=https://www.djangoproject.com/download/1.7c1/tarball/ # command to install dependencies -install: +install: - pip install unittest2 - pip install django==$DJANGO - "pip install -r requirements.txt" # command to run tests -script: python tests.py \ No newline at end of file +script: python tests.py diff --git a/django_behave/runner.py b/django_behave/runner.py index 5fb791f..4eadd2e 100644 --- a/django_behave/runner.py +++ b/django_behave/runner.py @@ -15,7 +15,12 @@ from django.test import LiveServerTestCase from django.db.models import get_app -from django.utils import six + +try: # I'm not sure if Django 1.4 does have six package + from django.utils.six.moves import range +except ImportError: + pass + from behave.configuration import Configuration, ConfigError, options from behave.runner import Runner as BehaveRunner from behave.parser import ParserError diff --git a/requirements.txt b/requirements.txt index 7af79b7..dd83628 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django>=1.5 +Django>=1.4 selenium parse behave>=1.2.3