Skip to content

Commit

Permalink
test: Close SQLite connections before cleanup on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 20, 2024
1 parent 03d5fc2 commit 82809dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from scrapyd import Config
from scrapyd.app import application
from scrapyd.utils import get_spider_queues
from scrapyd.website import Root
from tests import root_add_version

Expand All @@ -29,6 +30,9 @@ def root(request):

yield Root(config, app)

for spiderqueue in get_spider_queues(config).values():
spiderqueue.conn.close()

for setting in ("dbs_dir", "eggs_dir"):
directory = os.path.realpath(config.get(setting))
basedir = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
Expand Down

0 comments on commit 82809dd

Please sign in to comment.