Skip to content

Commit

Permalink
Fixed encoding warning in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 19, 2024
1 parent cad5def commit df6c0f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from __future__ import print_function

import pathlib

import py
import pytest

Expand Down Expand Up @@ -223,7 +225,6 @@ def test_junit_classname(testdir):
testdir.makepyfile("")
result = testdir.runpytest("--flake8", "--junit-xml=TEST.xml")
junit = testdir.tmpdir.join("TEST.xml")
with open(str(junit)) as j_file:
j_text = j_file.read()
j_text = pathlib.Path(junit).read_text(encoding='utf-8')
result.assert_outcomes(passed=1)
assert 'classname=""' not in j_text

0 comments on commit df6c0f5

Please sign in to comment.