Skip to content

Commit cfc88c8

Browse files
committed
Fix python3 unit tests.
In python3 the unicode prefix is gone, so it's impossible to compare a string representation in a compatible way.
1 parent a497aec commit cfc88c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
23

34
import re
45
import sys
@@ -566,8 +567,9 @@ def test_run_catch_all(self, capsys):
566567

567568
code = run('manage.py catch pos1 --foo pos2 --bar', manager.run)
568569
out, err = capsys.readouterr()
570+
out_list = [o.strip('u\'') for o in out.strip('[]\n').split(', ')]
569571
assert code == 0
570-
assert "[u'pos1', u'pos2', u'--bar']" in out
572+
assert ['pos1', 'pos2', '--bar'] == out_list
571573

572574
def test_run_bad_options(self, capsys):
573575
manager = Manager(self.app)

0 commit comments

Comments
 (0)