Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tests/test_example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import mypy2junit

def test_example():
lines = open('tests/mypy.txt').readlines()
with open('tests/mypy.txt') as file:
lines = file.readlines()
res, _ = mypy2junit.process_lines(lines)

assert res == """<?xml version="1.0" encoding="utf-8"?>
Expand All @@ -21,7 +22,8 @@ def test_example():
</testsuite>"""

def test_example_one():
lines = open('tests/mypy_one.txt').readlines()
with open('tests/mypy_one.txt') as file:
lines = file.readlines()
res, _ = mypy2junit.process_lines(lines)

assert res == """<?xml version="1.0" encoding="utf-8"?>
Expand All @@ -33,7 +35,8 @@ def test_example_one():


def test_success():
lines = open('tests/mypy_success.txt').readlines()
with open('tests/mypy_success.txt') as file:
lines = file.readlines()
res, _ = mypy2junit.process_lines(lines)

assert res == """<?xml version="1.0" encoding="utf-8"?>
Expand Down