mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
Make use of new str.startswith/endswith semantics.
Occurences in email and compiler were ignored due to backwards compat requirements.
This commit is contained in:
parent
3ebef999e6
commit
b2afe855e5
11 changed files with 14 additions and 20 deletions
|
|
@ -62,7 +62,7 @@ def testDefaultArgs(self):
|
|||
def testLineNo(self):
|
||||
# Test that all nodes except Module have a correct lineno attribute.
|
||||
filename = __file__
|
||||
if filename.endswith(".pyc") or filename.endswith(".pyo"):
|
||||
if filename.endswith((".pyc", ".pyo")):
|
||||
filename = filename[:-1]
|
||||
tree = compiler.parseFile(filename)
|
||||
self.check_lineno(tree)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue