python-cx_Oracle/test/TestEnv.py
Anthony Tuininga 8fda704186 Adjusted test cases to make use of encoding and nencoding parameters to both
standalone connection and session pool creation; added test cases for binding
and fetching supplemental characters as well as fetching temporary LOBs; tidied
up a few test cases as well.
2017-01-13 18:14:45 -07:00

24 lines
631 B
Python

"""Define test environment."""
import cx_Oracle
import os
import sys
import unittest
if sys.version_info[0] < 3:
input = raw_input
def GetValue(name, label, defaultValue = None):
value = os.environ.get("CX_ORACLE_" + name, defaultValue)
if value is None:
value = input(label + ": ")
return value
USERNAME = GetValue("USERNAME", "user name")
PASSWORD = GetValue("PASSWORD", "password")
TNSENTRY = GetValue("TNSENTRY", "TNS entry")
ENCODING = GetValue("ENCODING", "encoding", "UTF-8")
NENCODING = GetValue("NENCODING", "national encoding", "UTF-8")
ARRAY_SIZE = int(GetValue("ARRAY_SIZE", "array size"))