59c41535e3 | ||
---|---|---|
.. | ||
sql | ||
README.md | ||
drop_test.py | ||
setup_test.py | ||
test_1000_module.py | ||
test_1100_connection.py | ||
test_1200_cursor.py | ||
test_1300_cursor_var.py | ||
test_1400_datetime_var.py | ||
test_1500_types.py | ||
test_1600_dml_returning.py | ||
test_1700_error.py | ||
test_1800_interval_var.py | ||
test_1900_lob_var.py | ||
test_2000_long_var.py | ||
test_2100_nchar_var.py | ||
test_2200_number_var.py | ||
test_2300_object_var.py | ||
test_2400_session_pool.py | ||
test_2500_string_var.py | ||
test_2600_timestamp_var.py | ||
test_2700_aq.py | ||
test_2800_bulk_aq.py | ||
test_2900_rowid.py | ||
test_3000_subscription.py | ||
test_3100_boolean_var.py | ||
test_3200_features_12_1.py | ||
test_3300_soda_database.py | ||
test_3400_soda_collection.py | ||
test_3500_json.py | ||
test_3600_outputtypehandler.py | ||
test_3700_var.py | ||
test_3800_typehandler.py | ||
test_env.py |
README.md
This directory contains the test suite for cx_Oracle.
-
The schemas and SQL objects that are referenced in the test suite can be created by running the Python script setup_test.py. The script requires administrative privileges and will prompt for these credentials as well as the names of the schemas that will be created, unless a number of environment variables are set, as documented in the Python script test_env.py. Run the script using the following command:
python setup_test.py
Alternatively, the SQL script can be run directly via SQL*Plus, which will always prompt for the names of the schemas that will be created. Run the script using the following command:
sqlplus system/systempassword@hostname/servicename @sql/setup_test.sql
-
Run the test suite by issuing the following command in the top-level directory of your cx_Oracle installation:
tox
This will build the module in an independent environment and run the test suite using the module that was just built in that environment. Alternatively, you can use the currently installed build of cx_Oracle and run the following command instead:
python -m unittest discover -v -s test
You may also run each of the test scripts independently, as in:
python test_1000_module.py
-
After running the test suite, the schemas can be dropped by running the Python script drop_test.py. The script requires administrative privileges and will prompt for these credentials as well as the names of the schemas that will be dropped, unless a number of environment variables are set, as documented in the Python script test_env.py. Run the script using the following command:
python drop_test.py
Alternatively, the SQL script can be run directly via SQL*Plus, which will always prompt for the names of the schemas that will be dropped. Run the script using the following command:
sqlplus system/systempassword@hostname/servicename @sql/drop_test.sql