Skip to content

Commit

Permalink
Merge pull request #32 from Brobin/py35
Browse files Browse the repository at this point in the history
update to run tests against python 3.5
  • Loading branch information
Brobin committed Feb 1, 2016
2 parents 95339f7 + d150ccb commit 4617c11
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
env:
- DJANGO=1.7
- DJANGO=1.8
- DJANGO=1.9
matrix:
exclude:
- python: "3.5"
env: DJANGO=1.7
install:
- pip install -q Django==$DJANGO
- pip install coverage
Expand Down
2 changes: 1 addition & 1 deletion django_seed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import random


__version__ = '0.1.5'
__version__ = '0.1.6'


class Seed(object):
Expand Down
2 changes: 1 addition & 1 deletion django_seed/guessers.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def guess_format(self, field):
faker = self.faker
provider = self.provider

if django.VERSION[1] == 8:
if django.VERSION[1] >= 8:
if isinstance(field, DurationField):
return lambda x: provider.duration()
if isinstance(field, UUIDField):
Expand Down
11 changes: 7 additions & 4 deletions django_seed/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import django

from django.db import models
from django.utils import unittest
try:
from django.utils.unittest import TestCase
except:
from django.test import TestCase
from django.core.management import call_command


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


class SeederTestCase(unittest.TestCase):
class SeederTestCase(TestCase):

def test_population(self):
faker = fake
Expand Down Expand Up @@ -144,7 +147,7 @@ def test_no_entities_added(self):
self.assertTrue(isinstance(e, SeederException))


class APISeedTestCase(unittest.TestCase):
class APISeedTestCase(TestCase):

def setUp(self):
self.seed1 = Seed()
Expand Down Expand Up @@ -181,7 +184,7 @@ def test_faker_cache_seeder(self):
self.assertIs(seeder1, seeder2)


class SeedCommandTestCase(unittest.TestCase):
class SeedCommandTestCase(TestCase):

def test_seed_command(self):
call_command('seed', 'django_seed', number=10)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def find_version(*file_paths):
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Testing',
'Topic :: Utilities',
Expand Down

0 comments on commit 4617c11

Please sign in to comment.