Skip to content

Commit

Permalink
ensure we clear the storage dir after test completion (#3663)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodja authored Sep 2, 2024
1 parent 0692181 commit c0a85d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nicegui/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,5 @@ def clear(self) -> None:
self._tabs.clear()
for filepath in self.path.glob('storage-*.json'):
filepath.unlink()
if self.path.exists():
self.path.rmdir()
1 change: 1 addition & 0 deletions nicegui/testing/general_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def nicegui_reset_globals() -> Generator[None, None, None]:
app.get('/')(Client.auto_index_client.build_response)
binding.reset()
yield
app.reset()


def prepare_simulation(request: pytest.FixtureRequest) -> None:
Expand Down

0 comments on commit c0a85d0

Please sign in to comment.