Fix tests for old python versions not supporting type hints

pull/176/head
FlyingSamson 2022-05-22 15:51:03 +02:00
parent a743e0293c
commit 68e0d1f30d
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ class TestDocument(unittest.TestCase):
""" Test reading svg object contained in a StringIO object """
with open(join(dirname(__file__), 'polygons.svg'), 'r') as file:
# read entire file into string
file_content: str = file.read()
file_content = file.read()
# prepare stringio object
file_as_stringio = StringIO()
# paste file content into it
@ -38,7 +38,7 @@ class TestDocument(unittest.TestCase):
""" Test reading svg object contained in a string without svg attributes"""
with open(join(dirname(__file__), 'polygons.svg'), 'r') as file:
# read entire file into string
file_content: str = file.read()
file_content = file.read()
doc = Document.from_svg_string(file_content)

View File

@ -77,7 +77,7 @@ class TestSVG2Paths(unittest.TestCase):
""" Test reading svg object contained in a StringIO object """
with open(join(dirname(__file__), 'polygons.svg'), 'r') as file:
# read entire file into string
file_content: str = file.read()
file_content = file.read()
# prepare stringio object
file_as_stringio = StringIO()
# paste file content into it
@ -93,7 +93,7 @@ class TestSVG2Paths(unittest.TestCase):
""" Test reading svg object contained in a string without svg attributes"""
with open(join(dirname(__file__), 'polygons.svg'), 'r') as file:
# read entire file into string
file_content: str = file.read()
file_content = file.read()
paths, _ = svg_string2paths(file_content)
@ -103,7 +103,7 @@ class TestSVG2Paths(unittest.TestCase):
""" Test reading svg object contained in a string with svg attributes"""
with open(join(dirname(__file__), 'polygons.svg'), 'r') as file:
# read entire file into string
file_content: str = file.read()
file_content = file.read()
paths, _, _ = svg_string2paths2(file_content)