Add reddit flag for pytest
This commit is contained in:
parent
0652f53b50
commit
0c6a8e46a2
|
@ -14,6 +14,7 @@ def reddit_submission(reddit_instance) -> praw.models.Submission:
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.online
|
@pytest.mark.online
|
||||||
|
@pytest.mark.reddit
|
||||||
def test_gallery(reddit_submission: praw.models.Submission):
|
def test_gallery(reddit_submission: praw.models.Submission):
|
||||||
gallery = Gallery(reddit_submission)
|
gallery = Gallery(reddit_submission)
|
||||||
results = gallery.find_resources()
|
results = gallery.find_resources()
|
||||||
|
|
|
@ -43,6 +43,7 @@ def test_format_name_mock(format_string: str, expected: str, submission: Mock):
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.online
|
@pytest.mark.online
|
||||||
|
@pytest.mark.reddit
|
||||||
@pytest.mark.parametrize(('format_string', 'expected'),
|
@pytest.mark.parametrize(('format_string', 'expected'),
|
||||||
(('{SUBREDDIT}', 'Mindustry'),
|
(('{SUBREDDIT}', 'Mindustry'),
|
||||||
('{REDDITOR}', 'Gamer_player_boi'),
|
('{REDDITOR}', 'Gamer_player_boi'),
|
||||||
|
@ -57,6 +58,7 @@ def test_format_name_real(format_string: str, expected: str, reddit_submission:
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.online
|
@pytest.mark.online
|
||||||
|
@pytest.mark.reddit
|
||||||
@pytest.mark.parametrize(('format_string_directory', 'format_string_file', 'expected'),
|
@pytest.mark.parametrize(('format_string_directory', 'format_string_file', 'expected'),
|
||||||
(('{SUBREDDIT}', '{POSTID}', 'test/Mindustry/lgilgt.png'),
|
(('{SUBREDDIT}', '{POSTID}', 'test/Mindustry/lgilgt.png'),
|
||||||
('{SUBREDDIT}', '{TITLE}_{POSTID}',
|
('{SUBREDDIT}', '{TITLE}_{POSTID}',
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
[pytest]
|
[pytest]
|
||||||
markers =
|
markers =
|
||||||
online: tests require a connection to the internet
|
online: tests require a connection to the internet
|
||||||
|
reddit: tests require a connection to Reddit
|
Loading…
Reference in a new issue