]> granicus.if.org Git - python/commit
[3.6] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior...
authorAmmar Askar <ammar_askar@hotmail.com>
Fri, 6 Jul 2018 10:22:25 +0000 (06:22 -0400)
committerTal Einat <taleinat+github@gmail.com>
Fri, 6 Jul 2018 10:22:25 +0000 (13:22 +0300)
commit11c36a3e16f7fd4e937466014e8393ede4b61a25
treefdd7faaf59648aed31e1986543513f31c14797d8
parentc6671aecbcbd12ed234fdc4470363fc5ba0f4a3a
[3.6] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) (GH-8134)

Most of the change involves fixing up the test suite, which previously made
the assumption that there wouldn't be a new line if the input didn't end in
one.

Contributed by Ammar Askar.

(cherry picked from commit c4ef4896eac86a6759901c8546e26de4695a1389)
Lib/test/test_tokenize.py
Lib/tokenize.py
Misc/NEWS.d/next/Library/2018-06-24-01-57-14.bpo-33899.IaOcAr.rst [new file with mode: 0644]