Skip to content

Commit

Permalink
update scal3/event_lib_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Oct 20, 2023
1 parent 6e76308 commit 4d30696
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions scal3/event_lib_test.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
import atexit
import os
import shutil
import sys
import tempfile
import unittest

sys.path.append(".")

from scal3 import event_lib
from scal3.s_object import DefaultFileSystem

myTmpDir = tempfile.mkdtemp(prefix="starcal-event_lib_test-")
atexit.register(os.removedirs, myTmpDir)
fs = event_lib.DefaultFileSystem(myTmpDir)

def removeTempDir():
print(f"Removing {myTmpDir}")
shutil.rmtree(myTmpDir)

atexit.register(removeTempDir)
fs = DefaultFileSystem(myTmpDir)

event_lib.init(fs)
print("Loading groups")
eventGroups = event_lib.EventGroupsHolder.load(fs)
print("Loading trash")
eventTrash = event_lib.EventTrash.load(fs)


Expand Down

0 comments on commit 4d30696

Please sign in to comment.