Skip to content

Commit 8639904

Browse files
Add a test for error.tar.gz file
1 parent 543cafb commit 8639904

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/vasp/test_handlers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import datetime
44
import os
55
import shutil
6+
import tarfile
67
from glob import glob
78

89
import pytest
@@ -1018,6 +1019,9 @@ def test_check_correct(self) -> None:
10181019
assert dct["errors"] == ["Positive energy"]
10191020

10201021
assert os.path.isfile("error.1.tar.gz")
1022+
with tarfile.open("error1.tar.gz", "r:gz") as tar:
1023+
assert len(tar.getmembers()) > 0
1024+
10211025

10221026
incar = Incar.from_file("INCAR")
10231027

0 commit comments

Comments
 (0)