Skip to content

Commit

Permalink
Update test_core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bimac committed Dec 2, 2024
1 parent dd0502b commit ed594e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_dataframe_model(qtbot):


def test_fileWatcher(qtbot):
with tempfile.NamedTemporaryFile() as file:
with tempfile.NamedTemporaryFile(delete=False) as file:
parent = core.QObject()
path = Path(file.name)

Expand All @@ -97,6 +97,7 @@ def test_fileWatcher(qtbot):
with qtbot.assertNotEmitted(w.fileSizeChanged, wait=100):
with open(path, 'w') as f:
f.write('Hello, World?')
path.unlink()

with pytest.raises(FileNotFoundError):
core.FileWatcher(parent=parent, file='non-existent file')

0 comments on commit ed594e4

Please sign in to comment.