Skip to content

Commit

Permalink
fix tests on windows (partly)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurin Schmidt committed Nov 12, 2024
1 parent ecd76e3 commit 7b3468a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import copy
import multiprocessing
import os
import sys
import threading
import time
import unittest
Expand All @@ -18,7 +19,18 @@
)

SECRET = str(uuid.uuid4())
db = DAL("sqlite://storage_%s" % uuid.uuid4(), folder="/tmp/")
if sys.platform == "win32":
path = "./tmp/"
else:
path = "/tmp/"

try:
os.mkdir(path)
except Exception:
pass
with open(path + "sql.log", "w"):
pass
db = DAL("sqlite://storage_%s" % uuid.uuid4(), folder=path)
db.define_table("thing", Field("name"))
session = Session(secret=SECRET)
cache = Cache()
Expand Down

0 comments on commit 7b3468a

Please sign in to comment.