diff options
Diffstat (limited to 'tests/test_summary.py')
-rw-r--r-- | tests/test_summary.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_summary.py b/tests/test_summary.py index ae1153b9..dcf244a1 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -552,6 +552,23 @@ class SummaryTest(UsingModulesMixin, CoverageTest): with pytest.raises(NotPython, match=msg): self.get_report(cov, morfs=["mycode.py"]) + def test_accented_directory(self): + # Make a file with a non-ascii character in the directory name. + self.make_file("\xe2/accented.py", "print('accented')") + self.make_data_file(lines={abs_file("\xe2/accented.py"): [1]}) + report_expected = ( + "Name Stmts Miss Cover\n" + + "-----------------------------------\n" + + "\xe2/accented.py 1 0 100%\n" + + "-----------------------------------\n" + + "TOTAL 1 0 100%\n" + ) + + cov = coverage.Coverage() + cov.load() + output = self.get_report(cov, squeeze=False) + assert output == report_expected + @pytest.mark.skipif(env.JYTHON, reason="Jython doesn't like accented file names") def test_accenteddotpy_not_python(self): # We run a .py file with a non-ascii name, and when reporting, we can't |