summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2012-03-05 15:09:29 (GMT)
committerÉric Araujo <merwok@netwok.org>2012-03-05 15:09:29 (GMT)
commite413c06f35ba4c58f7b6e8aa6984131e94672831 (patch)
treec1e9e1426e7cd2dbc3ea9826ad0926681ca754ff /Lib/distutils/tests
parente5eec7e19898d872147ae55f65676c2f30b9461a (diff)
downloadcpython-e413c06f35ba4c58f7b6e8aa6984131e94672831.zip
cpython-e413c06f35ba4c58f7b6e8aa6984131e94672831.tar.gz
cpython-e413c06f35ba4c58f7b6e8aa6984131e94672831.tar.bz2
Make distutils’ upload command work with bdist_msi products (#13719).
Patch by Ralf Schmitt.
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r--Lib/distutils/tests/test_bdist_msi.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/Lib/distutils/tests/test_bdist_msi.py b/Lib/distutils/tests/test_bdist_msi.py
index 9308c79..9cbfb0c 100644
--- a/Lib/distutils/tests/test_bdist_msi.py
+++ b/Lib/distutils/tests/test_bdist_msi.py
@@ -1,12 +1,11 @@
"""Tests for distutils.command.bdist_msi."""
-import unittest
import sys
-
+import unittest
from test.support import run_unittest
-
from distutils.tests import support
-@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32")
+
+@unittest.skipUnless(sys.platform == 'win32', 'these tests require Windows')
class BDistMSITestCase(support.TempdirManager,
support.LoggingSilencer,
unittest.TestCase):
@@ -14,9 +13,18 @@ class BDistMSITestCase(support.TempdirManager,
def test_minimal(self):
# minimal test XXX need more tests
from distutils.command.bdist_msi import bdist_msi
- pkg_pth, dist = self.create_dist()
+ project_dir, dist = self.create_dist()
cmd = bdist_msi(dist)
cmd.ensure_finalized()
+ cmd.run()
+
+ bdists = os.listdir(os.path.join(project_dir, 'dist'))
+ self.assertEqual(bdists, ['foo-0.1.msi'])
+
+ # bug #13719: upload ignores bdist_msi files
+ self.assertEqual(dist.dist_files,
+ [('bdist_msi', 'any', 'dist/foo-0.1.msi')])
+
def test_suite():
return unittest.makeSuite(BDistMSITestCase)