Skip to content

Commit 3693a60

Browse files
committed
Employs pathlib interface in the tests
1 parent 444b5a9 commit 3693a60

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_autodocsumm.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
See the License for the specific language governing permissions and
1818
limitations under the License.
1919
"""
20-
import os.path as osp
20+
from pathlib import Path
2121
import re
2222
import bs4
2323
import pytest
@@ -37,8 +37,7 @@ def in_between(full, sub, s0, *others):
3737

3838

3939
def get_html(app, fname):
40-
with open(osp.join(str(app.outdir), fname)) as f:
41-
return f.read()
40+
return (Path(app.outdir) / fname).read_text()
4241

4342

4443
def get_soup(app, fname):

0 commit comments

Comments
 (0)