diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2020-03-03 20:53:18 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2020-03-03 20:53:18 +0000 |
| commit | 44b45d9f1998a449e6b0f0caf7b7f175086be6c7 (patch) | |
| tree | 0b34d3a168af568ad6c6e4cb617793bf1bea0726 /docutils/tools/test | |
| parent | f81389e6db412f7951b7a3ed45c75ab8f6b86440 (diff) | |
| download | docutils-44b45d9f1998a449e6b0f0caf7b7f175086be6c7.tar.gz | |
test_buildhtml: Drop obsolete NameError handling
It was added in r7442 because the imports were optional, however since
r8333 the imports are unconditional, so the NameError will never be
raised.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8498 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/tools/test')
| -rw-r--r-- | docutils/tools/test/test_buildhtml.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/docutils/tools/test/test_buildhtml.py b/docutils/tools/test/test_buildhtml.py index b2b7038dd..335f881c1 100644 --- a/docutils/tools/test/test_buildhtml.py +++ b/docutils/tools/test/test_buildhtml.py @@ -35,12 +35,9 @@ buildhtml_path = os.path.abspath(os.path.join( def process_and_return_filelist(options): dirs = [] files = [] - try: - p = Popen(buildhtml_path+" "+options, shell=True, - stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) - (cin, cout) = (p.stdin, p.stdout) - except NameError: - cin, cout = os.popen4(buildhtml_path+" "+options) + p = Popen(buildhtml_path+" "+options, shell=True, + stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) + (cin, cout) = (p.stdin, p.stdout) while True: line = cout.readline() if not line: @@ -73,11 +70,7 @@ class BuildHtmlTests(unittest.TestCase): ) def setUp(self): - try: - self.root = tempfile.mkdtemp() - except NameError: - self.root = os.tempnam() - os.mkdir(self.root) + self.root = tempfile.mkdtemp() for s in self.tree: s = os.path.join(self.root, s) |
