Skip to content

Commit

Permalink
Remove unused variables in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
devdanzin committed Jul 31, 2023
1 parent 09635bc commit 1fb95d7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/test_e57.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_global_box_center():
def test_file_not_found():
raised = False
try:
pointcloud: np.ndarray = e57.read_points(r"testdata/filenotfound.e57")
e57.read_points(r"testdata/filenotfound.e57")
except RuntimeError as e:
raised = True
assert "Failed to read E57" in str(e)
Expand All @@ -49,7 +49,7 @@ def test_file_not_found():
def test_empty_file():
raised = False
try:
pointcloud: np.ndarray = e57.read_points(r"testdata/empty.e57")
e57.read_points(r"testdata/empty.e57")
except RuntimeError as e:
raised = True
assert "Failed to read E57" in str(e)
Expand All @@ -60,7 +60,7 @@ def test_empty_file():
def test_invalid_file():
raised = False
try:
pointcloud: np.ndarray = e57.read_points(r"testdata/invalid.e57")
e57.read_points(r"testdata/invalid.e57")
except RuntimeError as e:
raised = True
assert "Failed to read E57" in str(e)
Expand All @@ -71,7 +71,7 @@ def test_invalid_file():
def test_just_xml():
raised = False
try:
pointcloud: np.ndarray = e57.read_points(r"testdata/justxml.e57")
e57.read_points(r"testdata/justxml.e57")
except RuntimeError as e:
raised = True
assert "Invalid E57 content" in str(e)
Expand All @@ -82,16 +82,16 @@ def test_just_xml():
def test_raw_xml_file_not_found():
raised = False
try:
raw_xml = e57.raw_xml(r"testdata/filenotfound.e57")
except FileNotFoundError as e:
e57.raw_xml(r"testdata/filenotfound.e57")
except FileNotFoundError:
raised = True
assert raised


def test_raw_xml_empty():
raised = False
try:
raw_xml = e57.raw_xml(r"testdata/empty.e57")
e57.raw_xml(r"testdata/empty.e57")
except RuntimeError as e:
raised = True
assert "Failed to read E57" in str(e)
Expand All @@ -102,7 +102,7 @@ def test_raw_xml_empty():
def test_raw_xml_invalid():
raised = False
try:
raw_xml = e57.raw_xml(r"testdata/invalid.e57")
e57.raw_xml(r"testdata/invalid.e57")
except RuntimeError as e:
raised = True
assert "Failed to read E57" in str(e)
Expand All @@ -113,7 +113,7 @@ def test_raw_xml_invalid():
def test_raw_xml_just_xml():
raised = False
try:
raw_xml = e57.raw_xml(r"testdata/justxml.e57")
e57.raw_xml(r"testdata/justxml.e57")
except RuntimeError as e:
raised = True
assert "Failed to read E57" in str(e)
Expand Down

0 comments on commit 1fb95d7

Please sign in to comment.