Skip to content

Commit

Permalink
Refactor to limit indentation and share behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jan 30, 2022
1 parent 198cd3b commit d16d759
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions distutils/tests/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,12 @@ def cleanup():

actual_headers = os.path.relpath(cmd.install_headers, self.user_base)
if os.name == 'nt':
expect_headers = os.path.join(
os.path.relpath(os.path.dirname(self.old_user_site), self.old_user_base),
'Include',
'xx',
)
site_path = os.path.relpath(
os.path.dirname(self.old_user_site), self.old_user_base)
include = os.path.join(site_path, 'Include')
else:
expect_headers = os.path.join(sysconfig.get_python_inc(0, ''), 'xx')
include = sysconfig.get_python_inc(0, '')
expect_headers = os.path.join(include, 'xx')

self.assertEqual(os.path.normcase(actual_headers), os.path.normcase(expect_headers))

Expand Down

0 comments on commit d16d759

Please sign in to comment.