Skip to content

Conversation

@Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Jul 22, 2019

Description

This merge request permits to :

  • See what file was not found when a NoFileError is launched.
  • See what is inside a list of FunctionalTest by being printed as FunctionalTest:test_name instead of <functional test object hexhash>.
  • Have a better error message when a functional test fails because of a fatal pylint error (Ie: You're modifying the way functional tests are launched and you broke it).

Previously :

E   Failed: Wrong results for file "abstract_method_py3 ":
E          
E    Unexpected in testdata:
E      1: fatal

With this merge request :

E  AssertionError: Pylint analysis failed because of 'No module named a.abstract_method_py3'
E   assert 'fatal' != 'fatal'
E    +  where 'fatal' = Message(msg_id='F0001', symbol='fatal', msg='No module named a.abstract_method_py3', ...
  • Permit to have subdirectory in tests/functional by using os.walk instead of os.listdir. There were hundreds of files all in the same directory and it was beginning to be hard to navigate. Now you can put any tests in any directory inside tests/functional.
  • Move functional tests in a directory corresponding to the first letter of their name so navigation between them is more manageable tests/functional/example_tests.py => tests/functional/e/example_test.py. For functional test starting with too move them in a tests/functional/too directory so developers are aware it's a possibility and there aren't any magic going on forcing you to use the one letter directory approach.

Type of Changes

Type
🔨 Refactoring

@coveralls
Copy link

coveralls commented Jul 22, 2019

Coverage Status

Coverage remained the same at 90.024% when pulling f4f34bd on Pierre-Sassoulas:easier-debugging-for-functional-tests into ac25a27 on PyCQA:master.

@Pierre-Sassoulas Pierre-Sassoulas force-pushed the easier-debugging-for-functional-tests branch from 83a2be0 to 004bae0 Compare August 3, 2019 19:28
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the easier-debugging-for-functional-tests branch 2 times, most recently from 20efeca to 6447b37 Compare August 16, 2019 16:25
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the easier-debugging-for-functional-tests branch from 6447b37 to f4f34bd Compare August 19, 2019 16:22
@Pierre-Sassoulas
Copy link
Member Author

@PCManticore #2036 is based on this one, this is not absolutely necessary for it to work, but I would appreciate to not have to rewrite the commit tree :)

Copy link
Contributor

@AWhetter AWhetter left a comment

Choose a reason for hiding this comment

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

This has bugged me for a while. Seems like a good change to me!

Copy link
Contributor

@AWhetter AWhetter left a comment

Choose a reason for hiding this comment

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

This has bugged me for a while. Seems like a worthwhile change to me!

@PCManticore
Copy link
Contributor

This is awesome! 😄 Thank you for tackling it @Pierre-Sassoulas

Merged it manually to get rid of the conflicts.

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.

4 participants