Skip to content

Commit

Permalink
TST: Adds request finalizer as teardown for unit env
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBarberini committed Mar 7, 2024
1 parent 13629ed commit a2630ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_location_set_topographic_profile_computes_elevation(
assert computed_elevation == theoretical_elevation


def test_environment_export_environment_exports_environment_json(example_spaceport_env):
def test_environment_export_environment_exports_environment_json(example_spaceport_env, request):
"""Tests the export_environment() method of the Environment class.
Parameters
Expand All @@ -103,7 +103,7 @@ def test_environment_export_environment_exports_environment_json(example_spacepo
"""
assert example_spaceport_env.export_environment(filename="environment") == None
assert os.path.isfile("environment.json")
example_spaceport_env.addfinalizer(os.remove("environment.json"))
request.addfinalizer(os.remove("environment.json"))


def test_geodesic_coordinate_geodesic_to_utm_converts_coordinate():
Expand Down

0 comments on commit a2630ce

Please sign in to comment.