mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Restoring pytest fixture so PyCharm can find fixtures.
This commit is contained in:
parent
3dda813b9e
commit
b0465cb7f2
2 changed files with 4 additions and 5 deletions
|
|
@ -93,7 +93,7 @@ class ChannelDownloader(Downloader, ABC):
|
|||
YT_DLP_BIN = pathlib.Path('/usr/local/bin/yt-dlp') # Location in docker container
|
||||
if not YT_DLP_BIN.is_file():
|
||||
YT_DLP_BIN = pathlib.Path('/opt/wrolpi/venv/bin/yt-dlp') # Use virtual environment location
|
||||
if not YT_DLP_BIN.is_file():
|
||||
if not YT_DLP_BIN.is_file() and not PYTEST:
|
||||
logger.error('COULD NOT FIND YT-DLP!!!')
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ from unittest import mock
|
|||
from uuid import uuid1
|
||||
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
import yaml
|
||||
from sanic_testing.testing import SanicTestClient
|
||||
from sqlalchemy.engine import Engine, create_engine
|
||||
|
|
@ -52,7 +51,7 @@ def test_db() -> Tuple[Engine, Session]:
|
|||
return test_engine, session
|
||||
|
||||
|
||||
@pytest_asyncio.fixture()
|
||||
@pytest.fixture()
|
||||
def test_session() -> Session:
|
||||
"""
|
||||
Pytest Fixture to get a test database session.
|
||||
|
|
@ -75,7 +74,7 @@ def test_session() -> Session:
|
|||
conn.close()
|
||||
|
||||
|
||||
@pytest_asyncio.fixture(autouse=True)
|
||||
@pytest.fixture(autouse=True)
|
||||
def test_directory() -> pathlib.Path:
|
||||
"""
|
||||
Overwrite the media directory with a temporary directory.
|
||||
|
|
@ -87,7 +86,7 @@ def test_directory() -> pathlib.Path:
|
|||
yield tmp_path
|
||||
|
||||
|
||||
@pytest_asyncio.fixture(autouse=True)
|
||||
@pytest.fixture(autouse=True)
|
||||
def test_config():
|
||||
"""
|
||||
Create a test config based off the example config.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue