mirror of
https://github.com/python/cpython.git
synced 2025-07-31 23:23:11 +00:00
Don't fail if the (sub)pkgname already exist.
This commit is contained in:
parent
05f97bffac
commit
008b861bf0
1 changed files with 3 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from test.test_support import run_unittest
|
from test.test_support import run_unittest
|
||||||
|
@ -198,8 +199,10 @@ class LongReprTest(unittest.TestCase):
|
||||||
self.pkgname = os.path.join(longname)
|
self.pkgname = os.path.join(longname)
|
||||||
self.subpkgname = os.path.join(longname, longname)
|
self.subpkgname = os.path.join(longname, longname)
|
||||||
# Make the package and subpackage
|
# Make the package and subpackage
|
||||||
|
shutil.rmtree(self.pkgname, ignore_errors=True)
|
||||||
os.mkdir(self.pkgname)
|
os.mkdir(self.pkgname)
|
||||||
touch(os.path.join(self.pkgname, '__init__'+os.extsep+'py'))
|
touch(os.path.join(self.pkgname, '__init__'+os.extsep+'py'))
|
||||||
|
shutil.rmtree(self.subpkgname, ignore_errors=True)
|
||||||
os.mkdir(self.subpkgname)
|
os.mkdir(self.subpkgname)
|
||||||
touch(os.path.join(self.subpkgname, '__init__'+os.extsep+'py'))
|
touch(os.path.join(self.subpkgname, '__init__'+os.extsep+'py'))
|
||||||
# Remember where we are
|
# Remember where we are
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue