Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.6 #640

Merged
merged 131 commits into from
Sep 27, 2022
Merged

v2.6 #640

merged 131 commits into from
Sep 27, 2022

Conversation

aliparlakci
Copy link
Collaborator

No description provided.

BlipRanger and others added 30 commits May 12, 2021 10:18
Clarify that fact that downloading by user doesn't work the same way as downloading by subreddit.

Feel free to user a better example username.  :)
Soulsuck24 and others added 12 commits September 16, 2022 20:41
If this doesn't work then I give up...
Cover edge cases that shouldn't ever happen but probably will sometime.

Also included Imgur changes to cover similar situations of malformed/redirected links.
This reverts commit 2f2b5b7.
Cover edge cases that shouldn't ever happen but probably will sometime.
Update Imgur logic to cover malformed links that cause a redirect leading to the html of the page being saved as an image.
@Soulsuck24
Copy link
Contributor

Soulsuck24 commented Sep 21, 2022

Is there any testing or anything in particular that needs to be done for this to get merged and put out as a new version? Can try to help if there is, just not sure as it's been here a while now and with the api changes at Redgifs it's probably best to get this out to the main branch sooner rather than later.

@Serene-Arc
Copy link
Owner

There's a requirement that all of the tests pass before the changes are pushed. I have to go through and troubleshoot the failing tests. For the site downloader modules, I have to see which resources are failing, investigate why they're failing, decide whether to remove them, and then find replacement test cases if they are removed.

The last one involves a fair bit of porn so I'm not raring to to go with that, but I'll get to them. If you want to take a crack at some of them, go ahead. Just please open a PR for each test module you change and try not to narrow the scope of the tests. Like if the test case is for a page with multiple image files, find a replacement with multiple image files.

I'm going to try to get a few of the tests fixed today but it's a process.

Update broken ID's in clone integration test
Update broken ID's in download integration test
Update user that was banned/suspended with one that should not end up that way.
@OMEGARAZER
Copy link
Contributor

So I took the changes from #668 and tested everything on my local instance and all the tests seem to have passed but there's 3 that were skipped in test_connector. I've tried to figure it out but as I'm not too familiar with pytest I'm not too sure what needs to be changed to fix it so they're not skipped.

============================================================================================================ test session starts ============================================================================================================
platform linux -- Python 3.10.6, pytest-7.1.3, pluggy-1.0.0
rootdir: /home/x/bulk-downloader-for-reddit, configfile: pytest.ini
collected 449 items

tests/test_archiver.py ...                                                                                                                                                                                                            [  0%]
tests/test_configuration.py ...                                                                                                                                                                                                       [  1%]
tests/test_connector.py ................................................sss..............................                                                                                                                             [ 19%]
tests/test_download_filter.py ...................                                                                                                                                                                                     [ 23%]
tests/test_downloader.py ...............                                                                                                                                                                                              [ 26%]
tests/test_file_name_formatter.py ......................................................................................                                                                                                              [ 46%]
tests/test_oauth2.py ............                                                                                                                                                                                                     [ 48%]
tests/test_resource.py ...........                                                                                                                                                                                                    [ 51%]
tests/archive_entry/test_comment_archive_entry.py ....                                                                                                                                                                                [ 52%]
tests/archive_entry/test_submission_archive_entry.py ..                                                                                                                                                                               [ 52%]
tests/integration_tests/test_archive_integration.py .................                                                                                                                                                                 [ 56%]
tests/integration_tests/test_clone_integration.py ....                                                                                                                                                                                [ 57%]

tests/integration_tests/test_download_integration.py .................................................................                                                                                                                [ 71%]
tests/site_downloaders/test_direct.py ..                                                                                                                                                                                              [ 72%]
tests/site_downloaders/test_download_factory.py ...........................................                                                                                                                                           [ 81%]
tests/site_downloaders/test_erome.py ....                                                                                                                                                                                             [ 82%]
tests/site_downloaders/test_gallery.py ........                                                                                                                                                                                       [ 84%]
tests/site_downloaders/test_gfycat.py ....                                                                                                                                                                                            [ 85%]
tests/site_downloaders/test_imgur.py ..........................                                                                                                                                                                       [ 91%]
tests/site_downloaders/test_pornhub.py .                                                                                                                                                                                              [ 91%]
tests/site_downloaders/test_redgifs.py ...........                                                                                                                                                                                    [ 93%]
tests/site_downloaders/test_self_post.py ...                                                                                                                                                                                          [ 94%]
tests/site_downloaders/test_vidble.py ..........                                                                                                                                                                                      [ 96%]
tests/site_downloaders/test_vreddit.py ..                                                                                                                                                                                             [ 97%]
tests/site_downloaders/test_youtube.py ...                                                                                                                                                                                            [ 97%]
tests/site_downloaders/fallback_downloaders/test_ytdlp_fallback.py ..........                                                                                                                                                         [100%]

============================================================================================================= warnings summary ==============================================================================================================
tests/test_connector.py::test_get_multireddits_public[helen_darten-test_multireddits0-10]
tests/test_connector.py::test_get_multireddits_public[korfor-test_multireddits1-100]
  /home/x/bulk-downloader-for-reddit/tests/test_connector.py:289: DeprecationWarning: Positional arguments for 'MultiredditHelper.__call__' will no longer be supported in PRAW 8.
  Call this function with 'redditor' and 'name' as keyword arguments.
    reddit_instance.multireddit(test_user, test_multireddits[0]),

tests/test_connector.py::test_get_multireddits_public[helen_darten-test_multireddits0-10]
tests/test_connector.py::test_get_multireddits_public[korfor-test_multireddits1-100]
tests/integration_tests/test_download_integration.py::test_cli_download_multireddit[test_args0]
tests/integration_tests/test_download_integration.py::test_cli_download_multireddit[test_args1]
tests/integration_tests/test_download_integration.py::test_cli_download_multireddit[test_args2]
tests/integration_tests/test_download_integration.py::test_cli_download_multireddit[test_args3]
tests/integration_tests/test_download_integration.py::test_cli_download_multireddit_nonexistent[test_args0]
  /home/x/bulk-downloader-for-reddit/bdfr/connector.py:326: DeprecationWarning: Positional arguments for 'MultiredditHelper.__call__' will no longer be supported in PRAW 8.
  Call this function with 'redditor' and 'name' as keyword arguments.
    multi = self.reddit_instance.multireddit(self.args.user[0], multi)

tests/archive_entry/test_comment_archive_entry.py: 148 warnings
tests/archive_entry/test_submission_archive_entry.py: 102 warnings
tests/integration_tests/test_archive_integration.py: 30979 warnings
tests/integration_tests/test_clone_integration.py: 1102 warnings
  /home/x/bulk-downloader-for-reddit/bdfr/archive_entry/base_archive_entry.py:35: DeprecationWarning: Positional arguments for 'CommentForest.replace_more' will no longer be supported in PRAW 8.
  Call this function with 'limit' as a keyword argument.
    in_comment.replies.replace_more(0)

tests/archive_entry/test_submission_archive_entry.py: 1 warning
tests/integration_tests/test_archive_integration.py: 354 warnings
tests/integration_tests/test_clone_integration.py: 4 warnings
  /home/x/bulk-downloader-for-reddit/bdfr/archive_entry/submission_archive_entry.py:48: DeprecationWarning: Positional arguments for 'CommentForest.replace_more' will no longer be supported in PRAW 8.
  Call this function with 'limit' as a keyword argument.
    self.source.comments.replace_more(0)

tests/integration_tests/test_archive_integration.py::test_cli_archive_all_user_comments[test_args0]
tests/integration_tests/test_archive_integration.py::test_cli_archive_all_user_comments[test_args1]
tests/integration_tests/test_download_integration.py::test_cli_download_search_subreddits_authenticated[test_args0]
tests/integration_tests/test_download_integration.py::test_cli_download_search_subreddits_authenticated[test_args1]
tests/integration_tests/test_download_integration.py::test_cli_download_user_specific_subreddits[test_args0]
tests/integration_tests/test_download_integration.py::test_cli_download_user_data_good[test_args1]
tests/integration_tests/test_download_integration.py::test_cli_download_user_data_good[test_args2]
tests/integration_tests/test_download_integration.py::test_cli_download_user_data_good[test_args3]
  /home/x/.local/lib/python3.10/site-packages/praw/reddit.py:583: DeprecationWarning: Token managers have been deprecated and will be removed in the near future. See https://www.reddit.com/r/redditdev/comments/olk5e6/followup_oauth2_api_changes_regarding_refresh/ for more details.
    self._prepare_common_authorizer(authenticator)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================================== 446 passed, 3 skipped, 32707 warnings in 4977.89s (1:22:57) ========================================================================================```

@Serene-Arc
Copy link
Owner

Fixed the issue of the skipped tests, was an old path issue.

@Serene-Arc Serene-Arc merged commit e7629d7 into master Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants