Skip to content

Commit

Permalink
Use os.path.split for testcase file name
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Jul 4, 2023
1 parent 48c0047 commit 816ee8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def parse_options(
flag_list = []
options = Options()
# TODO: Enable strict optional in test cases by default (requires *many* test case changes)
if testcase.file.rpartition("/")[2] in no_strict_optional_files:
if os.path.split(testcase.file)[1] in no_strict_optional_files:
options.strict_optional = False

options.error_summary = False
Expand Down

0 comments on commit 816ee8b

Please sign in to comment.