On 07/14/2015 07:06 AM, Paul Moore wrote: > On 14 July 2015 at 14:51, Florian Bruhin wrote: >>> On Tue, Jul 14, 2015 at 02:06:14PM +0200, Dima Tisnek wrote: >>>> https://bugs.python.org/issue21238 introduces detection of >>>> missing/misspelt mock.assert_xxx() calls on getattr level in Python >>>> 3.5 >>>> >>>> Michael and Kushal are of the opinion that "assret" is a common typo >>>> of "assert" and should be supported in a sense that it also triggers >>>> AttributeError and is not silently ignored like a mocked user >>>> attribute. This is ridiculous. >> With the patch, an AttributeError is raised if you call something >> starting with assert or assret instead. > In effect, this patch is "reserving" all attributes starting with > "assert" or "assret" as actual methods of the mock object, and not > mocked attributes. > > Reserving "assert" seems fair. Agreed. > Reserving "assret" seems odd, as people say why just this > mis-spelling? Refuse the temptation to guess. Imagine that English is not the only language people use, and assret is either an actual word or logical abbreviation in some other language -- we just broke their tests. Part of writing tests is making sure they fail (and for the right reason) -- proper testing of the tests would reveal such a typo. -- ~Ethan~
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4