summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author?ric Araujo <merwok@netwok.org>2012-04-21 10:30:23 -0400
committer?ric Araujo <merwok@netwok.org>2012-04-21 10:30:23 -0400
commitf44715e753d2c9c20065988de383a993b835d979 (patch)
tree5af504b6cce84589e1ea857b56676dec1e6f31f7
parent546d6752f54ed670d332533b84a5ad8df5e066e4 (diff)
parentceaa3f0daa4e64c403a0e705ff9a30e0854c54aa (diff)
downloaddisutils2-f44715e753d2c9c20065988de383a993b835d979.tar.gz
Merge Yannick?s test into main repo
-rw-r--r--distutils2/tests/test_command_bdist.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/distutils2/tests/test_command_bdist.py b/distutils2/tests/test_command_bdist.py
index 48ff1b3..a222d0f 100644
--- a/distutils2/tests/test_command_bdist.py
+++ b/distutils2/tests/test_command_bdist.py
@@ -2,7 +2,9 @@
import os
import sys
from StringIO import StringIO
+from distutils2.errors import PackagingPlatformError
from distutils2.command.bdist import bdist, show_formats
+
from distutils2.tests import unittest, support
@@ -43,6 +45,17 @@ class BuildTestCase(support.TempdirManager,
self.assertTrue(subcmd.skip_build,
'%s should take --skip-build from bdist' % name)
+ def test_unsupported_platform(self):
+ _os_name = os.name
+ try:
+ os.name = 'some-obscure-os'
+
+ dist = self.create_dist()[1]
+ cmd = bdist(dist)
+ self.assertRaises(PackagingPlatformError, cmd.ensure_finalized)
+ finally:
+ os.name = _os_name
+
def test_show_formats(self):
saved = sys.stdout
sys.stdout = StringIO()