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

AttributeError: type object 'TestDownload' has no attribute 'test_yourextractor' #13266

Closed
Wandang opened this issue Jun 2, 2017 · 1 comment
Closed
Labels

Comments

@Wandang
Copy link
Contributor

@Wandang Wandang commented Jun 2, 2017

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.05.29. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • [ x] I've verified and I assure that I'm running youtube-dl 2017.05.29

Before submitting an issue make sure you have:

  • [ x] At least skimmed through README and most notably FAQ and BUGS sections
  • [ x] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • [ x] Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • [ x] Question
  • Other

Description of your issue, suggested solution and other information

I am trying to contribute to this project (adding extractor) and encounter issues from the start.

The contribution page declares under point 6:

Run python test/test_download.py TestDownload.test_YourExtractor. This should fail at first, but you can continually re-run it until you're done. If you decide to add more than one test, then rename _TEST to _TESTS and make it into a list of dictionaries. The tests will then be named TestDownload.test_YourExtractor, TestDownload.test_YourExtractor_1, TestDownload.test_YourExtractor_2, etc.

I tried this after adding a new extractorfile named streammydirtyhobby.py with the default contend suggested in the contribution page (changed the classname ofc) and adding the import to the extractor.py

Unfortunately I get this cli output:

$ python test/test_download.py TestDownload.test_StreamMyDirtyHobbyIE
Traceback (most recent call last):
  File "test/test_download.py", line 265, in <module>
    unittest.main()
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: type object 'TestDownload' has no attribute 'test_StreamMyDirtyHobbyIE'

So I tried this with another already finished extractor like StreamangoIE and StreamcloudIE. Both crashed with the same error.

Sorry if I am missing something trivial here. This is my first approach in coding for an open source project and I am still reading into code guidelines/workflow.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 2, 2017

No IE must be at the end.

@dstftw dstftw closed this Jun 2, 2017
@dstftw dstftw added the invalid label Jun 2, 2017
@ytdl-org ytdl-org deleted a comment from kimnamcham Aug 27, 2018
@ytdl-org ytdl-org locked and limited conversation to collaborators Aug 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.