diff --git a/my/reddit/pushshift.py b/my/reddit/pushshift.py index e67db84..1c7ec8d 100644 --- a/my/reddit/pushshift.py +++ b/my/reddit/pushshift.py @@ -12,6 +12,9 @@ from my.core.common import Paths, Stats from dataclasses import dataclass from my.core.cfg import make_config +# note: keeping pushshift import before config import, so it's handled gracefully by import_source +from pushshift_comment_export.dal import read_file, PComment + from my.config import reddit as uconfig @dataclass @@ -29,7 +32,6 @@ from my.core import get_files from typing import Sequence, Iterator from pathlib import Path -from pushshift_comment_export.dal import read_file, PComment def inputs() -> Sequence[Path]: diff --git a/tests/reddit.py b/tests/reddit.py index a7b4265..d18b18d 100644 --- a/tests/reddit.py +++ b/tests/reddit.py @@ -11,6 +11,11 @@ def test_basic() -> None: assert len(list(saved())) > 0 +def test_comments() -> None: + from my.reddit.all import comments + assert len(list(comments())) > 0 + + def test_unfav() -> None: from my.reddit import events, saved ev = events()