Skip to content

Commit

Permalink
Fix test to be compatible with py2
Browse files Browse the repository at this point in the history
  • Loading branch information
wagnerluis1982 committed Dec 12, 2020
1 parent 1b3ba51 commit cb3e0f7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/masonry/builders/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,9 @@ def test_metadata_with_readme_files():

metadata = Parser().parsestr(builder.get_metadata_content())

with open(test_path / "README-1.rst") as f1, open(test_path / "README-2.rst") as f2:
assert metadata.get_payload() == "%s\n%s\n" % (f1.read(), f2.read())
readme1 = test_path / "README-1.rst"
readme2 = test_path / "README-2.rst"
assert metadata.get_payload() == "%s\n%s\n" % (
readme1.read_text(),
readme2.read_text(),
)

0 comments on commit cb3e0f7

Please sign in to comment.