]> granicus.if.org Git - python/commit
bpo-31324: Optimize support._match_test() (#4523) (#4524)
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 23 Nov 2017 17:34:59 +0000 (18:34 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Nov 2017 17:34:59 +0000 (18:34 +0100)
commit35d99830f1878867e3964577741d9a2d5a7fc8f7
tree70d12e581f7eb018cb0441a874a998a584f8b522
parent2d5890eda62477982361405d3486e57f590c78ae
bpo-31324: Optimize support._match_test() (#4523) (#4524)

* bpo-31324: Optimize support._match_test() (#4421)

* Rename support._match_test() to support.match_test(): make it
  public
* Remove support.match_tests global variable. It is replaced with a
  new support.set_match_tests() function, so match_test() doesn't
  have to check each time if patterns were modified.
* Rewrite match_test(): use different code paths depending on the
  kind of patterns for best performances.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 803ddd8ce22f0de3ab42fb98a225a704c000ef06)

* bpo-31324: Fix test.support.set_match_tests(None) (#4505)

(cherry picked from commit bb11c3c967afaf263e00844d4ab461b7fafd6d36)
(cherry picked from commit 70b2f8797146a56a6880743424f0bedf4fc30c62)
Lib/test/regrtest.py
Lib/test/support/__init__.py
Lib/test/test_test_support.py