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

Initial provider tests #1794

Merged
merged 27 commits into from
Nov 21, 2017
Merged

Initial provider tests #1794

merged 27 commits into from
Nov 21, 2017

Conversation

medariox
Copy link
Contributor

@medariox medariox commented Dec 14, 2016

  • PR is based on the DEVELOP branch
  • Don't send big changes all at once. Split up big PRs into multiple smaller PRs that are easier to manage and review
  • Read the contribution guide

Todo:
- [ ] Test with non-ascii results

  • Support magnet links
    - [ ] Add support for private providers
    - [ ] Improve code

Includes:

  • Tests for all public torrent providers
  • Fixes all broken public torrent providers
  • Adds vcrpy

@ratoaq2
Copy link
Contributor

ratoaq2 commented Dec 14, 2016

Nice :-)

@ratoaq2
Copy link
Contributor

ratoaq2 commented Dec 14, 2016

Take a look in VCR (the one that subliminal uses: https://github.com/Diaoul/subliminal/blob/master/tests/test_legendastv.py#L13-L16 )

You can just annotate the test method: https://github.com/Diaoul/subliminal/blob/master/tests/test_legendastv.py#L112

And it will do a real request to the site (only first time) and record it in a yaml file:
https://github.com/Diaoul/subliminal/blob/master/tests/cassettes/legendastv/test_search_titles_episode.yaml

It worth to take a look at it. It might help. If you do use it, don't forget to remove/change your user/password from the generate yaml files before pushing your code to github.

@medariox
Copy link
Contributor Author

Thanks for the feedback @ratoaq2. VRC looks promising, will see what I can do with it.

What do you think about the structure? I wanted to avoid having to deal with single tests for each provider (subliminal-like), as they can be hard to maintain, but I'm open to suggestions.

Copy link
Contributor

@ratoaq2 ratoaq2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a good initiative. Can we rebase and merge it?

@medariox
Copy link
Contributor Author

@ratoaq2
Sadly atm not even the basic tests are working. I will try to have something that at least works for the WE.

@medariox medariox force-pushed the feature/provider-tests branch from e6f80d6 to 2e427af Compare April 10, 2017 17:51
@medariox
Copy link
Contributor Author

This is now rebased and fixed. It should work with any provider type, although I just tried with public torrent providers (magnets) for now. Works offline as well after the first run. What should be added is some way to strip the sensitive data from private trackers. I won't have much time this week, but feedback is always appreciated.

@p0psicles
Copy link
Contributor

Let's try to get it to a mergeable state. The provider coverage is not important imo. So let's try to have the tests working for a subset. And expand in time.

@medariox
Copy link
Contributor Author

medariox commented Nov 12, 2017

@p0psicles
That's the plan. I will only add tests for public torrent providers for now. The problem is that with every new test, new issues come up (which is the whole point of tests) and these take time to be fixed.

@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@pymedusa pymedusa deleted a comment Nov 12, 2017
@medariox
Copy link
Contributor Author

The PR is now concluded! 🎉

@medariox medariox modified the milestones: 0.2.0, 0.1.18 Nov 17, 2017
@medariox medariox merged commit 364be02 into develop Nov 21, 2017
@medariox medariox deleted the feature/provider-tests branch November 21, 2017 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants