Skip to content

Commit 4617c11

Browse files
committed
Merge pull request #32 from Brobin/py35
update to run tests against python 3.5
2 parents 95339f7 + d150ccb commit 4617c11

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
language: python
22
python:
33
- "2.7"
4-
- "3.3"
54
- "3.4"
5+
- "3.5"
66
env:
77
- DJANGO=1.7
88
- DJANGO=1.8
9+
- DJANGO=1.9
10+
matrix:
11+
exclude:
12+
- python: "3.5"
13+
env: DJANGO=1.7
914
install:
1015
- pip install -q Django==$DJANGO
1116
- pip install coverage

django_seed/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import random
33

44

5-
__version__ = '0.1.5'
5+
__version__ = '0.1.6'
66

77

88
class Seed(object):

django_seed/guessers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def guess_format(self, field):
7575
faker = self.faker
7676
provider = self.provider
7777

78-
if django.VERSION[1] == 8:
78+
if django.VERSION[1] >= 8:
7979
if isinstance(field, DurationField):
8080
return lambda x: provider.duration()
8181
if isinstance(field, UUIDField):

django_seed/tests.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
import django
88

99
from django.db import models
10-
from django.utils import unittest
10+
try:
11+
from django.utils.unittest import TestCase
12+
except:
13+
from django.test import TestCase
1114
from django.core.management import call_command
1215

1316

@@ -59,7 +62,7 @@ class Action(models.Model):
5962
target = models.ForeignKey(Player, related_name='enemy_actions+', null=True)
6063

6164

62-
class SeederTestCase(unittest.TestCase):
65+
class SeederTestCase(TestCase):
6366

6467
def test_population(self):
6568
faker = fake
@@ -144,7 +147,7 @@ def test_no_entities_added(self):
144147
self.assertTrue(isinstance(e, SeederException))
145148

146149

147-
class APISeedTestCase(unittest.TestCase):
150+
class APISeedTestCase(TestCase):
148151

149152
def setUp(self):
150153
self.seed1 = Seed()
@@ -181,7 +184,7 @@ def test_faker_cache_seeder(self):
181184
self.assertIs(seeder1, seeder2)
182185

183186

184-
class SeedCommandTestCase(unittest.TestCase):
187+
class SeedCommandTestCase(TestCase):
185188

186189
def test_seed_command(self):
187190
call_command('seed', 'django_seed', number=10)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def find_version(*file_paths):
4848
'Programming Language :: Python :: 2.7',
4949
'Programming Language :: Python :: 3',
5050
'Programming Language :: Python :: 3.2',
51-
'Programming Language :: Python :: 3.3',
5251
'Programming Language :: Python :: 3.4',
52+
'Programming Language :: Python :: 3.5',
5353
'Topic :: Software Development :: Libraries :: Python Modules',
5454
'Topic :: Software Development :: Testing',
5555
'Topic :: Utilities',

0 commit comments

Comments
 (0)