Permalink
Browse files

Reintegrating Python 2.5 compatibility and adding Python 3.3 tests.

  • Loading branch information...
1 parent 8f414ea commit 1a53648880a48df16acf42e073edb3991a6f045c @gregmuellegger committed Feb 26, 2013
View
@@ -1,4 +1,3 @@
-https://github.com/praekelt/django-setuptest/tarball/master#egg=django-setuptest
-https://bitbucket.org/andrewgodwin/south/get/default.tar.gz#egg=South
+South
argparse
mock
View
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
__version__ = "0.5.0"
View
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
import sys
from django.db import router
from django.db.models import signals
View
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
import sys
from itertools import chain
from django import forms
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
from django.db import models
from sortedm2m.fields import SortedManyToManyField
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
from django.db.models.fields import FieldDoesNotExist
from django.test import TestCase
from django.utils import six
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
from django import forms
from django.test import TestCase
from sortedm2m.forms import SortedMultipleChoiceField
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
from django.db import models
from sortedm2m.fields import SortedManyToManyField
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
from django.db import models
from ..models import Photo
from sortedm2m.fields import SortedManyToManyField
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
from django.db import models
from ..models import Photo
from sortedm2m.fields import SortedManyToManyField
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
from django.db import models
from ..models import Photo
from sortedm2m.fields import SortedManyToManyField
@@ -9,11 +9,9 @@
if sys.version_info[0] < 3:
from StringIO import StringIO
- _string_prefix = 'u'
else:
from io import StringIO
- _string_prefix = ''
class SouthMigratedModelTests(TestCase):
@@ -81,7 +79,7 @@ def test_new_model(self):
self.assertExpectedStrings([
"Adding SortedM2M table for field new_photos on 'CompleteNewPhotoStream'",
- "(%s'%s', models.IntegerField())" % (_string_prefix, SORT_VALUE_FIELD_NAME),
+ "('%s', models.IntegerField())" % SORT_VALUE_FIELD_NAME,
], output)
self.assertExpectedStrings([
@@ -100,7 +98,7 @@ def test_new_field(self):
self.assertExpectedStrings([
"Adding SortedM2M table for field photos on 'PhotoStream'",
- "(%s'%s', models.IntegerField())" % (_string_prefix, SORT_VALUE_FIELD_NAME),
+ "('%s', models.IntegerField())" % SORT_VALUE_FIELD_NAME,
], output)
self.assertExpectedStrings([
@@ -119,7 +117,7 @@ def test_custom_sort_field_name(self):
self.assertExpectedStrings([
"Adding SortedM2M table for field photos on 'FeaturedPhotos'",
- "(%s'featured_nr', models.IntegerField())" % _string_prefix,
+ "('featured_nr', models.IntegerField())",
], output)
self.assertExpectedStrings([
View
26 tox.ini
@@ -3,6 +3,7 @@ envlist =
py26-1.4, py26-1.5,
py27-1.4, py27-1.5, py27-trunk,
py32-1.5, py32-trunk,
+ py33-1.5, py33-trunk,
pypy-1.4, pypy-1.5, pypy-trunk,
[testenv]
@@ -50,13 +51,33 @@ deps =
basepython = python3.2
deps =
Django==1.5
- -r{toxinidir}/requirements/tests.txt
+ argparse
+ mock
+ https://bitbucket.org/andrewgodwin/south/get/default.tar.gz#egg=South
[testenv:py32-trunk]
basepython = python3.2
deps =
https://github.com/django/django/tarball/master#egg=Django
- -r{toxinidir}/requirements/tests.txt
+ argparse
+ mock
+ https://bitbucket.org/andrewgodwin/south/get/default.tar.gz#egg=South
+
+[testenv:py33-1.5]
+basepython = python3.3
+deps =
+ Django==1.5
+ argparse
+ mock
+ https://bitbucket.org/andrewgodwin/south/get/default.tar.gz#egg=South
+
+[testenv:py33-trunk]
+basepython = python3.3
+deps =
+ https://github.com/django/django/tarball/master#egg=Django
+ argparse
+ mock
+ https://bitbucket.org/andrewgodwin/south/get/default.tar.gz#egg=South
[testenv:pypy-1.4]
basepython = pypy
@@ -75,4 +96,3 @@ basepython = pypy
deps =
https://github.com/django/django/tarball/master#egg=Django
-r{toxinidir}/requirements/tests.txt
-

0 comments on commit 1a53648

Please sign in to comment.