Skip to content

Commit e470569

Browse files
use abs path over relative path
1 parent 4c99fe7 commit e470569

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pyperformance/benchmarks/bm_mypy_types.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
# commit: 0fcc5299e6fefba7eefcacd4aceb112971d48c7b on 21 Oct 2020.
55
# license: https://github.com/pyston/python-macrobenchmarks/blob/main/LICENSE
66
# It has been updated and modified for pyperformance.
7-
# The benchmark runs mypy against its own types file multiple times.
7+
# The benchmark runs mypy against its own types file.
88

99
import os
10+
import sys
1011

1112
import pyperf
1213

@@ -16,7 +17,7 @@
1617
runner = pyperf.Runner()
1718
runner.metadata['description'] = ('Mypy benchmark: '
1819
'type-check mypy/types.py')
19-
target_path = os.path.join(os.path.dirname(__file__), 'data',
20-
'bm_mypy_target.py')
21-
runner.bench_command('mypy_types', ['mypy', target_path])
20+
target_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'data',
21+
'bm_mypy_target.py'))
22+
runner.bench_command('mypy_types', [sys.executable, '-m', 'mypy', target_path])
2223

0 commit comments

Comments
 (0)