Skip to content

Commit

Permalink
test: Print sys.path for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 20, 2024
1 parent b5db2aa commit 5591b26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os.path
import sys

import pytest
from twisted.web import http
from twisted.web.http import Request
Expand All @@ -19,6 +22,8 @@ def txrequest():
# Use this fixture when testing the Scrapyd web UI or API or writing configuration files.
@pytest.fixture()
def chdir(monkeypatch, tmpdir):
sys.path.insert(0, os.path.abspath(".."))
print(sys.path) # noqa: T201 for debugging in CI
return monkeypatch.chdir(tmpdir)


Expand Down
4 changes: 2 additions & 2 deletions tests/mockserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class MockScrapydServer:
def __init__(self, authentication=None):
self.authentication = authentication

def __enter__(self, authentication=None):
"""Launch Scrapyd application object with ephemeral port"""
def __enter__(self):
print(sys.path) # noqa: T201 for debugging in CI
command = [sys.executable, "-m", "tests.start_mock_app", get_ephemeral_port()]
if self.authentication is not None:
command.append("--auth=" + self.authentication)
Expand Down

0 comments on commit 5591b26

Please sign in to comment.