mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
Bump cherrypy from 18.8.0 to 18.9.0 (#2266)
* Bump cherrypy from 18.8.0 to 18.9.0 Bumps [cherrypy](https://github.com/cherrypy/cherrypy) from 18.8.0 to 18.9.0. - [Changelog](https://github.com/cherrypy/cherrypy/blob/main/CHANGES.rst) - [Commits](https://github.com/cherrypy/cherrypy/compare/v18.8.0...v18.9.0) --- updated-dependencies: - dependency-name: cherrypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update cherrypy==18.9.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
cfefa928be
commit
faef9a94c4
673 changed files with 159850 additions and 11583 deletions
134
lib/adodbapi/test/setuptestframework.py
Normal file
134
lib/adodbapi/test/setuptestframework.py
Normal file
|
@ -0,0 +1,134 @@
|
|||
#!/usr/bin/python2
|
||||
# Configure this in order to run the testcases.
|
||||
"setuptestframework.py v 2.6.0.8"
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
try:
|
||||
OSErrors = (WindowsError, OSError)
|
||||
except NameError: # not running on Windows
|
||||
OSErrors = OSError
|
||||
|
||||
|
||||
def maketemp():
|
||||
temphome = tempfile.gettempdir()
|
||||
tempdir = os.path.join(temphome, "adodbapi_test")
|
||||
try:
|
||||
os.mkdir(tempdir)
|
||||
except:
|
||||
pass
|
||||
return tempdir
|
||||
|
||||
|
||||
def _cleanup_function(testfolder, mdb_name):
|
||||
try:
|
||||
os.unlink(os.path.join(testfolder, mdb_name))
|
||||
except:
|
||||
pass # mdb database not present
|
||||
try:
|
||||
shutil.rmtree(testfolder)
|
||||
print(" cleaned up folder", testfolder)
|
||||
except:
|
||||
pass # test package not present
|
||||
|
||||
|
||||
def getcleanupfunction():
|
||||
return _cleanup_function
|
||||
|
||||
|
||||
def find_ado_path():
|
||||
adoName = os.path.normpath(os.getcwd() + "/../../adodbapi.py")
|
||||
adoPackage = os.path.dirname(adoName)
|
||||
return adoPackage
|
||||
|
||||
|
||||
# make a new package directory for the test copy of ado
|
||||
def makeadopackage(testfolder):
|
||||
adoName = os.path.normpath(os.getcwd() + "/../adodbapi.py")
|
||||
adoPath = os.path.dirname(adoName)
|
||||
if os.path.exists(adoName):
|
||||
newpackage = os.path.join(testfolder, "adodbapi")
|
||||
try:
|
||||
os.mkdir(newpackage)
|
||||
except OSErrors:
|
||||
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 EnvironmentError("Connot find source of adodbapi to test.")
|
||||
|
||||
|
||||
def makemdb(testfolder, mdb_name):
|
||||
# following setup code borrowed from pywin32 odbc test suite
|
||||
# kindly contributed by Frank Millman.
|
||||
import os
|
||||
|
||||
_accessdatasource = os.path.join(testfolder, mdb_name)
|
||||
if os.path.isfile(_accessdatasource):
|
||||
print("using JET database=", _accessdatasource)
|
||||
else:
|
||||
try:
|
||||
from win32com.client import constants
|
||||
from win32com.client.gencache import EnsureDispatch
|
||||
|
||||
win32 = True
|
||||
except ImportError: # perhaps we are running IronPython
|
||||
win32 = False # iron Python
|
||||
try:
|
||||
from System import Activator, Type
|
||||
except:
|
||||
pass
|
||||
|
||||
# Create a brand-new database - what is the story with these?
|
||||
dbe = None
|
||||
for suffix in (".36", ".35", ".30"):
|
||||
try:
|
||||
if win32:
|
||||
dbe = EnsureDispatch("DAO.DBEngine" + suffix)
|
||||
else:
|
||||
type = Type.GetTypeFromProgID("DAO.DBEngine" + suffix)
|
||||
dbe = Activator.CreateInstance(type)
|
||||
break
|
||||
except:
|
||||
pass
|
||||
if dbe:
|
||||
print(" ...Creating ACCESS db at " + _accessdatasource)
|
||||
if win32:
|
||||
workspace = dbe.Workspaces(0)
|
||||
newdb = workspace.CreateDatabase(
|
||||
_accessdatasource, constants.dbLangGeneral, constants.dbVersion40
|
||||
)
|
||||
else:
|
||||
newdb = dbe.CreateDatabase(
|
||||
_accessdatasource, ";LANGID=0x0409;CP=1252;COUNTRY=0"
|
||||
)
|
||||
newdb.Close()
|
||||
else:
|
||||
print(" ...copying test ACCESS db to " + _accessdatasource)
|
||||
mdbName = os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__), "..", "examples", "test.mdb")
|
||||
)
|
||||
import shutil
|
||||
|
||||
shutil.copy(mdbName, _accessdatasource)
|
||||
|
||||
return _accessdatasource
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Setting up a Jet database for server to use for remote testing...")
|
||||
temp = maketemp()
|
||||
makemdb(temp, "server_test.mdb")
|
Loading…
Add table
Add a link
Reference in a new issue