Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-04-30 Thread Serhiy Storchaka
01.05.19 00:24, Chris Withers пише: I have a crazy idea of getting unittest.mock up to 100% code coverage. I noticed at the bottom of all of the test files in testmock/, there's a: if __name__ == '__main__':     unittest.main() ...block. How would people feel about these going away? I don't

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-04-30 Thread Chris Withers
On 01/05/2019 06:12, Terry Reedy wrote: Such blocks should be excluded from coverage by the default .coveragerc file.  Mine came with exclude_lines =     # Don't complain if non-runnable code isn't run:     if 0:     if __name__ == .__main__.:     if DEBUG: Which .coveragerc are you refer

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-04-30 Thread Terry Reedy
On 4/30/2019 5:24 PM, Chris Withers wrote: Hi All, I have a crazy idea of getting unittest.mock up to 100% code coverage. I noticed at the bottom of all of the test files in testmock/, there's a: if __name__ == '__main__':     unittest.main() ...block. Such blocks should be excluded from c

Re: [Python-Dev] drop jython support in mock backport?

2019-04-30 Thread Jeff Allen
Cross-posting to jython-users for obvious reasons. Jeff Allen On 30/04/2019 10:26, Chris Withers wrote: [resending to python-dev in case there are Jython users here...] Hi All, If you need Jython support in the mock backport, please shout now: https://github.com/testing-cabal/mock/issues/453

Re: [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-04-30 Thread Robert Collins
They were never needed 😁 Removal is fine with me. On Wed, 1 May 2019, 09:27 Chris Withers, wrote: > Hi All, > > I have a crazy idea of getting unittest.mock up to 100% code coverage. > > I noticed at the bottom of all of the test files in testmock/, there's a: > > if __name__ == '__main__': >

[Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

2019-04-30 Thread Chris Withers
Hi All, I have a crazy idea of getting unittest.mock up to 100% code coverage. I noticed at the bottom of all of the test files in testmock/, there's a: if __name__ == '__main__':     unittest.main() ...block. How would people feel about these going away? I don't *think* they're needed now t

[Python-Dev] drop jython support in mock backport?

2019-04-30 Thread Chris Withers
[resending to python-dev in case there are Jython users here...] Hi All, If you need Jython support in the mock backport, please shout now: https://github.com/testing-cabal/mock/issues/453 cheers, Chris ___ Python-Dev mailing list Python-Dev@python

[Python-Dev] PEP 574 ready for review

2019-04-30 Thread Antoine Pitrou
Hello, I've put the final touches to PEP 574 - Pickle protocol 5 with out-of-band data (*). It is now ready for review. The implementation is fully functional, as well as its PyPI backport (**), and has regression tests against Numpy. Numpy and PyArrow have their own tests against the pickle5