diff options
| author | ?ric Araujo <merwok@netwok.org> | 2011-11-12 00:33:44 +0100 |
|---|---|---|
| committer | ?ric Araujo <merwok@netwok.org> | 2011-11-12 00:33:44 +0100 |
| commit | b160fba2c0cbad389abc1bdbc94c82c1a26edfc9 (patch) | |
| tree | a29e937238959c3cf9aa095c185b6d635bacb4bb /distutils2/tests/test_command_upload_docs.py | |
| parent | ece9f034f63215cffa88e1ccec68f70261e03c38 (diff) | |
| download | disutils2-b160fba2c0cbad389abc1bdbc94c82c1a26edfc9.tar.gz | |
Clean up some idioms in tests.
- Use os.makedirs (I had forgotten about it!)
- Let TempdirManager.write_file call os.path.join for us
- Let TempdirManager.tearDown go back to the previous working directory
for us
- Use a skip instead of hiding a method with an underscore
- Reset the finalized attribute of command objects before calling
ensure_finalized a second time, so that it?s not a no-op
- Address pyflakes warnings
Diffstat (limited to 'distutils2/tests/test_command_upload_docs.py')
| -rw-r--r-- | distutils2/tests/test_command_upload_docs.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/distutils2/tests/test_command_upload_docs.py b/distutils2/tests/test_command_upload_docs.py index d6edc37..589e6a9 100644 --- a/distutils2/tests/test_command_upload_docs.py +++ b/distutils2/tests/test_command_upload_docs.py @@ -32,6 +32,7 @@ password = long_island """ +#@skip if no threading, see end of file class UploadDocsTestCase(support.TempdirManager, support.EnvironRestorer, support.LoggingCatcher, @@ -69,9 +70,8 @@ class UploadDocsTestCase(support.TempdirManager, if sample_dir is None: sample_dir = self.mkdtemp() os.mkdir(os.path.join(sample_dir, "docs")) - self.write_file(os.path.join(sample_dir, "docs", "index.html"), - "Ce mortel ennui") - self.write_file(os.path.join(sample_dir, "index.html"), "Oh la la") + self.write_file((sample_dir, "docs", "index.html"), "Ce mortel ennui") + self.write_file((sample_dir, "index.html"), "Oh la la") return sample_dir def test_zip_dir(self): |
