1
0
Fork 0
mirror of synced 2024-06-17 01:34:40 +12:00

Add reddit flag for pytest

This commit is contained in:
Serene-Arc 2021-02-26 19:19:12 +10:00 committed by Ali Parlakci
parent 0652f53b50
commit 0c6a8e46a2
3 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,7 @@ def reddit_submission(reddit_instance) -> praw.models.Submission:
@pytest.mark.online
@pytest.mark.reddit
def test_gallery(reddit_submission: praw.models.Submission):
gallery = Gallery(reddit_submission)
results = gallery.find_resources()

View file

@ -43,6 +43,7 @@ def test_format_name_mock(format_string: str, expected: str, submission: Mock):
@pytest.mark.online
@pytest.mark.reddit
@pytest.mark.parametrize(('format_string', 'expected'),
(('{SUBREDDIT}', 'Mindustry'),
('{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.reddit
@pytest.mark.parametrize(('format_string_directory', 'format_string_file', 'expected'),
(('{SUBREDDIT}', '{POSTID}', 'test/Mindustry/lgilgt.png'),
('{SUBREDDIT}', '{TITLE}_{POSTID}',

View file

@ -1,3 +1,4 @@
[pytest]
markers =
online: tests require a connection to the internet
online: tests require a connection to the internet
reddit: tests require a connection to Reddit