Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c6a13ad

Browse files
Add current tox.ini directory to PYTHONPATH in order to use imports form there
Fix regression on PY3 caused by unicode_literals
1 parent 5c53b14 commit c6a13ad

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎example/factories/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- encoding: utf-8 -*-
2-
from __future__ import unicode_literals
32

43
import factory
54
from faker import Factory as FakerFactory
@@ -22,8 +21,7 @@ class Meta:
2221
name = factory.LazyAttribute(lambda x: faker.name())
2322
email = factory.LazyAttribute(lambda x: faker.email())
2423

25-
bio = factory.RelatedFactory(b'example.factories.AuthorBioFactory', 'author')
26-
24+
bio = factory.RelatedFactory('example.factories.AuthorBioFactory', 'author')
2725

2826
class AuthorBioFactory(factory.django.DjangoModelFactory):
2927
class Meta:

‎tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ deps =
1414
drf33: djangorestframework>=3.3,<3.4
1515
-r{toxinidir}/requirements-development.txt
1616

17-
setenv= DJANGO_SETTINGS_MODULE=example.settings.test
17+
setenv =
18+
PYTHONPATH = {toxinidir}
19+
DJANGO_SETTINGS_MODULE=example.settings.test
1820

1921
commands =
2022
py.test --basetemp={envtmpdir}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /