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. I disagree Google search for "assret" site:github.com yields 9 hits in total, of which: 1 (cliques.c) is a variable with intended spelling; 1 issue with a warning about the variable above 1 typo in a readme file 2 comments 1 email address 3 references to this very Python change Thus the question, how far should Python go to detect possible erroneous user behaviour? Granted it is in tests only, but why not detect assrte, sasert, saster and assrat? Shouldn't linters and IDEs take care of this anyway? d. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com