Skip to content

Commit d16d759

Browse files
committed
Refactor to limit indentation and share behavior.
1 parent 198cd3b commit d16d759

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

distutils/tests/test_install.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,12 @@ def cleanup():
126126

127127
actual_headers = os.path.relpath(cmd.install_headers, self.user_base)
128128
if os.name == 'nt':
129-
expect_headers = os.path.join(
130-
os.path.relpath(os.path.dirname(self.old_user_site), self.old_user_base),
131-
'Include',
132-
'xx',
133-
)
129+
site_path = os.path.relpath(
130+
os.path.dirname(self.old_user_site), self.old_user_base)
131+
include = os.path.join(site_path, 'Include')
134132
else:
135-
expect_headers = os.path.join(sysconfig.get_python_inc(0, ''), 'xx')
133+
include = sysconfig.get_python_inc(0, '')
134+
expect_headers = os.path.join(include, 'xx')
136135

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

0 commit comments

Comments
 (0)