[Python-checkins] distutils2: merge
tarek.ziade
python-checkins at python.org
Sun Jan 23 15:48:23 CET 2011
tarek.ziade pushed d5a104df0675 to distutils2:
http://hg.python.org/distutils2/rev/d5a104df0675
changeset: 867:d5a104df0675
parent: 866:aad812e70fac
parent: 865:359fcc5917f1
user: Mathieu Leduc-Hamel <mathieu at lesite.ca>
date: Wed Dec 08 22:32:00 2010 -0500
summary:
merge
files:
distutils2/mkcfg.py
diff --git a/distutils2/mkcfg.py b/distutils2/mkcfg.py
--- a/distutils2/mkcfg.py
+++ b/distutils2/mkcfg.py
@@ -317,7 +317,7 @@
for root, dirs, files in os.walk(curdir):
if to_skip(root):
continue
- for dir_ in dirs:
+ for dir_ in sorted(dirs):
if to_skip(dir_):
continue
fullpath = os.path.join(root, dir_)
@@ -334,7 +334,7 @@
if True in [root.startswith(path) for path in scanned]:
continue
- for file in files:
+ for file in sorted(files):
fullpath = os.path.join(root, file)
if to_skip(fullpath):
continue
diff --git a/distutils2/tests/test_command_upload.py b/distutils2/tests/test_command_upload.py
--- a/distutils2/tests/test_command_upload.py
+++ b/distutils2/tests/test_command_upload.py
@@ -5,6 +5,7 @@
from distutils2.command.upload import upload
from distutils2.dist import Distribution
+from distutils2.errors import DistutilsOptionError
from distutils2.tests import unittest, support
from distutils2.tests.pypi_server import PyPIServer, PyPIServerTestCase
@@ -59,6 +60,14 @@
('repository', 'http://pypi.python.org/pypi')):
self.assertEqual(getattr(cmd, attr), expected)
+ def test_finalize_options_unsigned_identity_yields_exception(self):
+ self.write_file(self.rc, PYPIRC)
+ dist = Distribution()
+ cmd = upload(dist)
+ cmd.identity = True
+ cmd.sign = False
+ self.assertRaises(DistutilsOptionError, cmd.finalize_options)
+
def test_saved_password(self):
# file with no password
self.write_file(self.rc, PYPIRC_NOPASSWORD)
@@ -76,6 +85,11 @@
cmd.finalize_options()
self.assertEqual(cmd.password, 'xxx')
+ def test_upload_without_files_yields_exception(self):
+ dist = Distribution()
+ cmd = upload(dist)
+ self.assertRaises(DistutilsOptionError, cmd.run)
+
def test_upload(self):
path = os.path.join(self.tmp_dir, 'xxx')
self.write_file(path)
diff --git a/distutils2/tests/test_config.py b/distutils2/tests/test_config.py
--- a/distutils2/tests/test_config.py
+++ b/distutils2/tests/test_config.py
@@ -1,4 +1,4 @@
-# -*- encoding: utf8 -*-
+# -*- encoding: utf-8 -*-
"""Tests for distutils.config."""
import os
import sys
diff --git a/distutils2/tests/test_mixin2to3.py b/distutils2/tests/test_mixin2to3.py
--- a/distutils2/tests/test_mixin2to3.py
+++ b/distutils2/tests/test_mixin2to3.py
@@ -60,7 +60,7 @@
mixin2to3 = Mixin2to3()
- mixin2to3._run_2to3(files=[code_name],
+ mixin2to3._run_2to3(files=[code_name], doctests=[code_name],
fixers=['distutils2.tests.fixer'])
converted_code_content = "isinstance(x, T)"
new_code_content = "".join(open(code_name).readlines())
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# -*- encoding: utf8 -*-
+# -*- encoding: utf-8 -*-
import sys
import os
import re
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list