Skip to content

Commit

Permalink
test_jsonfmt: temporary data file clean-up
Browse files Browse the repository at this point in the history
Fix #72
  • Loading branch information
PierreRaybaut committed Mar 12, 2024
1 parent 8a52aa4 commit 0c002ea
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog #

## Version 3.4.2 ##

In this release, test coverage is 76%.

* [Issue #72](https://github.com/PlotPyStack/guidata/issues/72) - unit test leave files during the build usr/lib/python3/dist-packages/test.json


## Version 3.4.1 ##

In this release, test coverage is 76%.
Expand Down
2 changes: 1 addition & 1 deletion guidata/tests/unit/test_h5fmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def __init__(self) -> None:
def test_hdf5_datamodel_compatiblity():
"""Test HDF5 I/O with data model compatibility"""
path = osp.abspath("test.h5")
atexit.register(lambda: os.unlink(path))
atexit.register(os.unlink, path)
# Serialize the first version of the data model
model_v10 = MyDataModelV10()
model_v10.save(path)
Expand Down
3 changes: 3 additions & 0 deletions guidata/tests/unit/test_jsonfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

from __future__ import annotations

import atexit
import os
import os.path as osp

from guidata.env import execenv
Expand Down Expand Up @@ -115,6 +117,7 @@ def __init__(self) -> None:
def test_json_datamodel_compatiblity():
"""Test JSON I/O with data model compatibility"""
path = osp.abspath("test.json")
atexit.register(os.unlink, path)
# atexit.register(lambda: os.unlink(path))
# Serialize the first version of the data model
model_v10 = MyDataModelV10()
Expand Down

0 comments on commit 0c002ea

Please sign in to comment.