fixed bdist_msi imports and added a test module for distutils.command.bdist_msi

This commit is contained in:
Tarek Ziadé 2010-01-26 17:20:37 +00:00
parent ffd849618a
commit b28e5d7e41
2 changed files with 26 additions and 3 deletions

View File

@ -6,15 +6,15 @@
"""
Implements the bdist_msi command.
"""
import sys, os
from sysconfig import get_python_version, get_platform
from distutils.core import Command
from distutils.dir_util import remove_tree
from distutils.sysconfig import get_python_version
from distutils.version import StrictVersion
from distutils.errors import DistutilsOptionError
from distutils.util import get_platform
from distutils import log
import msilib
from msilib import schema, sequence, text
from msilib import Directory, Feature, Dialog, add_data

View File

@ -0,0 +1,23 @@
"""Tests for distutils.command.bdist_msi."""
import unittest
import sys
from distutils.tests import support
@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32")
class BDistMSITestCase(support.TempdirManager,
support.LoggingSilencer,
unittest.TestCase):
def test_minial(self):
# minimal test XXX need more tests
from distutils.command.bdist_msi import bdist_msi
pkg_pth, dist = self.create_dist()
cmd = bdist_msi(dist)
cmd.ensure_finalized()
def test_suite():
return unittest.makeSuite(BDistMSITestCase)
if __name__ == '__main__':
test_support.run_unittest(test_suite())