Skip to content

Commit

Permalink
remove lib2to3
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Jul 22, 2024
1 parent 377a3ef commit 1f3c573
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions adodbapi/test/setuptestframework.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"setuptestframework.py v 2.6.0.8"
import os
import shutil
import sys
import tempfile


Expand Down Expand Up @@ -46,21 +45,14 @@ def makeadopackage(testfolder):
if os.path.exists(adoName):
newpackage = os.path.join(testfolder, "adodbapi")
try:
os.mkdir(newpackage)
os.makedirs(newpackage)
except OSError:
print(
"*Note: temporary adodbapi package already exists: may be two versions running?"
)
for f in os.listdir(adoPath):
if f.endswith(".py"):
shutil.copy(os.path.join(adoPath, f), newpackage)
if sys.version_info >= (3, 0): # only when running Py3.n
save = sys.stdout
sys.stdout = None
from lib2to3.main import main # use 2to3 to make test package

main("lib2to3.fixes", args=["-n", "-w", newpackage])
sys.stdout = save
return testfolder
else:
raise OSError("Connot find source of adodbapi to test.")
Expand Down

0 comments on commit 1f3c573

Please sign in to comment.