Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Recover global state after test_util.py #5824

Merged
merged 1 commit into from
Jun 19, 2020
Merged

Conversation

mbaret
Copy link
Contributor

@mbaret mbaret commented Jun 16, 2020

In test_util.py, a program exit is simulated to test that the error throwing behaviour is accurate. Unforunately, this also deletes necessary global state and so all subsequent tests that run and use tempdir throw the same error.

This patch is a simple fix to restore the global state at the end of the test.

@mbaret
Copy link
Contributor Author

mbaret commented Jun 16, 2020

cc @areusch @tqchen

Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix, @mbaret!

In test_util.py, a program exit is simulated to test
that the error throwing behaviour is accurate.
Unforunately, this also deletes necessary global state
and so all subsequent tests that run and use tempdir
throw the same error.

This patch is a simple fix to restore the global state
at the end of the test.

Change-Id: I62fef46167e47f6af43271e2ce1db30f54857647
@tqchen tqchen merged commit c890573 into apache:master Jun 19, 2020
@tqchen
Copy link
Member

tqchen commented Jun 19, 2020

Thanks @mbaret ! Thanks @areusch for reviewing

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jun 30, 2020
In test_util.py, a program exit is simulated to test
that the error throwing behaviour is accurate.
Unforunately, this also deletes necessary global state
and so all subsequent tests that run and use tempdir
throw the same error.

This patch is a simple fix to restore the global state
at the end of the test.

Change-Id: I62fef46167e47f6af43271e2ce1db30f54857647
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Jul 2, 2020
In test_util.py, a program exit is simulated to test
that the error throwing behaviour is accurate.
Unforunately, this also deletes necessary global state
and so all subsequent tests that run and use tempdir
throw the same error.

This patch is a simple fix to restore the global state
at the end of the test.

Change-Id: I62fef46167e47f6af43271e2ce1db30f54857647
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants