Skip to content

Commit

Permalink
change env clean order
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMoelans committed Feb 5, 2025
1 parent 1b857ec commit fedd7fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tests/test_integration_crashpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def test_crashpad_crash_proxy_env(cmake, httpserver):
assert child.returncode # well, it's a crash after all
assert waiting.result
finally:
proxy_test_finally(1, httpserver, proxy_process)
cleanup_proxy_env_vars()
proxy_test_finally(1, httpserver, proxy_process)


def test_crashpad_crash_proxy_env_port_incorrect(cmake, httpserver):
Expand All @@ -99,8 +99,8 @@ def test_crashpad_crash_proxy_env_port_incorrect(cmake, httpserver):
child = run(tmp_path, "sentry_example", ["log", "crash"], env=env)
assert child.returncode # well, it's a crash after all
finally:
proxy_test_finally(0, httpserver, proxy_process)
cleanup_proxy_env_vars()
proxy_test_finally(0, httpserver, proxy_process)


def test_crashpad_proxy_set_empty(cmake, httpserver):
Expand All @@ -122,8 +122,8 @@ def test_crashpad_proxy_set_empty(cmake, httpserver):
assert waiting.result

finally:
proxy_test_finally(1, httpserver, proxy_process, expected_proxy_logsize=0)
cleanup_proxy_env_vars()
proxy_test_finally(1, httpserver, proxy_process, expected_proxy_logsize=0)


def test_crashpad_proxy_https_not_http(cmake, httpserver):
Expand All @@ -144,8 +144,8 @@ def test_crashpad_proxy_https_not_http(cmake, httpserver):
assert waiting.result

finally:
proxy_test_finally(1, httpserver, proxy_process, expected_proxy_logsize=0)
del os.environ["https_proxy"]
proxy_test_finally(1, httpserver, proxy_process, expected_proxy_logsize=0)


@pytest.mark.parametrize(
Expand Down
8 changes: 4 additions & 4 deletions tests/test_integration_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,8 @@ def test_proxy_from_env(cmake, httpserver):
)

finally:
proxy_test_finally(1, httpserver, proxy_process)
cleanup_proxy_env_vars()
proxy_test_finally(1, httpserver, proxy_process)


def test_proxy_from_env_port_incorrect(cmake, httpserver):
Expand All @@ -680,8 +680,8 @@ def test_proxy_from_env_port_incorrect(cmake, httpserver):
)

finally:
proxy_test_finally(0, httpserver, proxy_process)
cleanup_proxy_env_vars()
proxy_test_finally(0, httpserver, proxy_process)


def test_proxy_auth(cmake, httpserver):
Expand Down Expand Up @@ -778,8 +778,8 @@ def test_proxy_set_empty(cmake, httpserver):
)

finally:
proxy_test_finally(1, httpserver, proxy_process, expected_proxy_logsize=0)
cleanup_proxy_env_vars()
proxy_test_finally(1, httpserver, proxy_process, expected_proxy_logsize=0)


def test_proxy_https_not_http(cmake, httpserver):
Expand All @@ -803,8 +803,8 @@ def test_proxy_https_not_http(cmake, httpserver):
)

finally:
proxy_test_finally(1, httpserver, proxy_process, expected_proxy_logsize=0)
del os.environ["https_proxy"]
proxy_test_finally(1, httpserver, proxy_process, expected_proxy_logsize=0)


@pytest.mark.parametrize(
Expand Down

0 comments on commit fedd7fe

Please sign in to comment.