Skip to content
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.

Commit

Permalink
Fix tests with isort on Python 2
Browse files Browse the repository at this point in the history
Isort creators are nicely allowed to go to hell for their pie_slice
module.
  • Loading branch information
liZe committed Sep 14, 2016
1 parent c5c0282 commit 8022229
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ test = pytest
addopts = --flake8 --isort --cov --ignore=test/cairosvg_reference
norecursedirs = dist .cache .git build *.egg-info .eggs venv cairosvg_reference
flake8-ignore = docs/conf.py ALL
isort_ignore = setup.py docs/conf.py
isort_ignore =
docs/conf.py
setup.py
8 changes: 8 additions & 0 deletions tinycss/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

from __future__ import unicode_literals

import sys


# Awful workaround to fix isort's "sys.setdefaultencoding('utf-8')".
if sys.version_info[0] == 2:
reload(sys) # noqa
sys.setdefaultencoding('ascii')


def assert_errors(errors, expected_errors):
"""Test not complete error messages but only substrings."""
Expand Down

0 comments on commit 8022229

Please sign in to comment.