comparison tests/check-perf-code.py @ 41732:eb8a8af4cbd0

tests: correct the remaining fallout from recent path style changes on Windows Per @martinvonz, `ui.slash` set by the test runner is now capable of playing a more active role.[1] I verified that both of these work by setting `ui.slash` to False, but these changes seem cleaner. The problem with check-perf-code.py was that the proper imports were not being whitelisted due to '\' vs '/'. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-February/128701.html
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 17 Feb 2019 22:39:12 -0500
parents bd872f64a8ba
children caebe5e7f4bd
comparison
equal deleted inserted replaced
41731:6704696141b8 41732:eb8a8af4cbd0
22 ] 22 ]
23 ] 23 ]
24 24
25 def modulewhitelist(names): 25 def modulewhitelist(names):
26 replacement = [('.py', ''), ('.c', ''), # trim suffix 26 replacement = [('.py', ''), ('.c', ''), # trim suffix
27 ('mercurial%s' % (os.sep), ''), # trim "mercurial/" path 27 ('mercurial%s' % ('/'), ''), # trim "mercurial/" path
28 ] 28 ]
29 ignored = {'__init__'} 29 ignored = {'__init__'}
30 modules = {} 30 modules = {}
31 31
32 # convert from file name to module name, and count # of appearances 32 # convert from file name to module name, and count # of appearances