Hackfut Security File Manager
Current Path:
/opt/alt/python37/lib64/python3.7/site-packages/psycopg2/tests
opt
/
alt
/
python37
/
lib64
/
python3.7
/
site-packages
/
psycopg2
/
tests
/
📁
..
📄
__init__.py
(3.03 KB)
📁
__pycache__
📄
dbapi20.py
(31.52 KB)
📄
dbapi20_tpc.py
(4.04 KB)
📄
test_async.py
(15.39 KB)
📄
test_bugX000.py
(1.64 KB)
📄
test_bug_gc.py
(1.68 KB)
📄
test_cancel.py
(3.64 KB)
📄
test_connection.py
(38.73 KB)
📄
test_copy.py
(11.65 KB)
📄
test_cursor.py
(20.8 KB)
📄
test_dates.py
(23.54 KB)
📄
test_errcodes.py
(2.09 KB)
📄
test_extras_dictcursor.py
(17.03 KB)
📄
test_green.py
(4.11 KB)
📄
test_lobject.py
(14.87 KB)
📄
test_module.py
(10.93 KB)
📄
test_notify.py
(6.98 KB)
📄
test_psycopg2_dbapi20.py
(1.9 KB)
📄
test_quote.py
(8.13 KB)
📄
test_transaction.py
(9.01 KB)
📄
test_types_basic.py
(18.23 KB)
📄
test_types_extras.py
(61.78 KB)
📄
test_with.py
(7.21 KB)
📄
testconfig.py
(1.22 KB)
📄
testutils.py
(10.88 KB)
Editing: testconfig.py
# Configure the test suite from the env variables. import os dbname = os.environ.get('PSYCOPG2_TESTDB', 'psycopg2_test') dbhost = os.environ.get('PSYCOPG2_TESTDB_HOST', None) dbport = os.environ.get('PSYCOPG2_TESTDB_PORT', None) dbuser = os.environ.get('PSYCOPG2_TESTDB_USER', None) dbpass = os.environ.get('PSYCOPG2_TESTDB_PASSWORD', None) repl_dsn = os.environ.get('PSYCOPG2_TEST_REPL_DSN', "dbname=psycopg2_test replication=1") # Check if we want to test psycopg's green path. green = os.environ.get('PSYCOPG2_TEST_GREEN', None) if green: if green == '1': from psycopg2.extras import wait_select as wait_callback elif green == 'eventlet': from eventlet.support.psycopg2_patcher import eventlet_wait_callback \ as wait_callback else: raise ValueError("please set 'PSYCOPG2_TEST_GREEN' to a valid value") import psycopg2.extensions psycopg2.extensions.set_wait_callback(wait_callback) # Construct a DSN to connect to the test database: dsn = 'dbname=%s' % dbname if dbhost is not None: dsn += ' host=%s' % dbhost if dbport is not None: dsn += ' port=%s' % dbport if dbuser is not None: dsn += ' user=%s' % dbuser if dbpass is not None: dsn += ' password=%s' % dbpass
Upload File
Create Folder