File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ sphinx = true
109
109
[tool .pytest .ini_options ]
110
110
# py.test options:
111
111
DJANGO_SETTINGS_MODULE = " tests.settings"
112
+ PYTHONIOENCODING = " utf-8"
112
113
python_files = " test_*.py"
113
114
norecursedirs = " *.egg .eggs dist build docs .tox .git __pycache__ shellcompletion"
114
115
env = [
Original file line number Diff line number Diff line change @@ -605,7 +605,7 @@ def test_helps_rich(self):
605
605
"routine" ,
606
606
"--help" ,
607
607
],
608
- env = os .environ .copy (),
608
+ env = { ** os .environ .copy (), "PYTHONIOENCODING" : "utf-8" } ,
609
609
capture_output = True ,
610
610
)
611
611
self .assertEqual (
@@ -614,7 +614,7 @@ def test_helps_rich(self):
614
614
self .assertFalse (result .stderr )
615
615
hlp_txt = self .strip_ansi (result .stdout .decode ()).strip ()
616
616
expected = self .routine_help_rich .strip ()
617
- self .assertEqual ( hlp_txt , expected )
617
+ self .assertGreater ( similarity ( hlp_txt , expected ), 0.99 )
618
618
619
619
stdout = StringIO ()
620
620
You can’t perform that action at this time.
0 commit comments