asyncio icon indicating copy to clipboard operation
asyncio copied to clipboard

Add tests that don't mock out selectors, sockets etc.

Open GoogleCodeExporter opened this issue 10 years ago • 2 comments

Hi,

While working on a fix to issue #106, I realized that no unit test uses the 
selector classes of the selectors module. Only mocks are used.

It would be nice to run "some" tests using a real selector, to have a better 
code coverage.

Or maybe I ran incorrectly tests? I used "python3 runtests.py" in Tulip.

Victor

Original issue reported on code.google.com by [email protected] on 20 Jan 2014 at 6:03

GoogleCodeExporter avatar Apr 10 '15 16:04 GoogleCodeExporter

That's the correct way of running the tests. Have you run coverage?

Aren't the selectors' own tests sufficient? Or maybe this is a dupe of issue 
#122?

Original comment by [email protected] on 8 Feb 2014 at 4:58

GoogleCodeExporter avatar Apr 10 '15 16:04 GoogleCodeExporter

I think it would be good to be able to test the selector use from asyncio 
directly with the real selector classes, rather than relying on the mocks being 
correct.

A similar request (for more "real" tests) was just made in issue 144. I am 
renaming this issue to cover all.

Original comment by [email protected] on 9 Jan 2015 at 4:29

  • Changed title: Add tests that don't mock out selectors, sockets etc.

GoogleCodeExporter avatar Apr 10 '15 16:04 GoogleCodeExporter