mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Clean up some idioms in packaging tests.
- Use os.makedirs (I had forgotten about it!) - Let TempdirManager.write_file call os.path.join for us - Remove custom command added by test_dist - Use a skip instead of hiding a method with an underscore - Address pyflakes warnings
This commit is contained in:
parent
79d9c42b04
commit
f3f283a1cb
13 changed files with 40 additions and 37 deletions
|
@ -117,6 +117,11 @@ class InstallDataTestCase(support.TempdirManager,
|
|||
dist.command_obj['install_distinfo'] = cmd
|
||||
cmd.run()
|
||||
|
||||
# first a few sanity checks
|
||||
self.assertEqual(os.listdir(scripts_dir), ['spamd'])
|
||||
self.assertEqual(os.listdir(install_dir), ['Spamlib-0.1.dist-info'])
|
||||
|
||||
# now the real test
|
||||
fn = os.path.join(install_dir, 'Spamlib-0.1.dist-info', 'RESOURCES')
|
||||
with open(fn, encoding='utf-8') as fp:
|
||||
content = fp.read().strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue