]> granicus.if.org Git - python/commit
bpo-31324: Optimize support._match_test() (#4421)
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 21 Nov 2017 23:34:02 +0000 (15:34 -0800)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2017 23:34:02 +0000 (15:34 -0800)
commit803ddd8ce22f0de3ab42fb98a225a704c000ef06
treea4193e3e3380dbe654b556042f4a6fc00f48a97e
parent431665bf1971e66c51f59abf0693f700ff7919e8
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>
Lib/test/libregrtest/main.py
Lib/test/libregrtest/runtest.py
Lib/test/support/__init__.py
Lib/test/test_support.py