Skip to content

update to run tests against python 3.5 #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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