|
1 | 1 | This directory contains the test suite for cx_Oracle. |
2 | 2 |
|
3 | | -1. The schemas and SQL objects that are referenced in the test suite can be |
4 | | - created by running the Python script [SetupTest.py][1]. The script requires |
5 | | - administrative privileges and will prompt for these credentials as well as |
6 | | - the names of the schemas that will be created, unless a number of |
7 | | - environment variables are set as documented in the Python script |
8 | | - [TestEnv.py][2]. Run the script using the following command: |
| 3 | +1. The schemas and SQL objects that are referenced in the test suite can be |
| 4 | + created by running the Python script [SetupTest.py][1]. The script requires |
| 5 | + administrative privileges and will prompt for these credentials as well as |
| 6 | + the names of the schemas that will be created, unless a number of |
| 7 | + environment variables are set, as documented in the Python script |
| 8 | + [test_env.py][2]. Run the script using the following command: |
9 | 9 |
|
10 | | - python SetupTest.py |
| 10 | + python SetupTest.py |
11 | 11 |
|
12 | | - Alternatively, the [SQL script][3] can be run directly via SQL\*Plus, which |
13 | | - will always prompt for the names of the schemas that will be created. Run |
14 | | - the script using the following command: |
| 12 | + Alternatively, the [SQL script][3] can be run directly via SQL\*Plus, which |
| 13 | + will always prompt for the names of the schemas that will be created. Run |
| 14 | + the script using the following command: |
15 | 15 |
|
16 | | - sqlplus system/systempassword@hostname/servicename @sql/SetupTest.sql |
| 16 | + sqlplus system/systempassword@hostname/servicename @sql/SetupTest.sql |
17 | 17 |
|
18 | | -2. Run the test suite by issuing the following command in the top-level |
19 | | - directory of your cx_Oracle installation: |
| 18 | +2. Run the test suite by issuing the following command in the top-level |
| 19 | + directory of your cx_Oracle installation: |
20 | 20 |
|
21 | | - tox |
| 21 | + tox |
22 | 22 |
|
23 | | - Alternatively, you can run the test suite directly within this directory: |
| 23 | + This will build the module in an independent environment and run the test |
| 24 | + suite using the module that was just built in that environment. |
| 25 | + Alternatively, you can use the currently installed build of cx_Oracle and |
| 26 | + run the following command instead: |
24 | 27 |
|
25 | | - python TestEnv.py |
| 28 | + python -m unittest discover -v -s test |
26 | 29 |
|
27 | | -3. After running the test suite, the schemas can be dropped by running the |
28 | | - Python script [DropTest.py][4]. The script requires administrative |
29 | | - privileges and will prompt for these credentials as well as the names of the |
30 | | - schemas that will be dropped, unless a number of environment variables are |
31 | | - set as documented in the Python script [TestEnv.py][2]. Run the script using |
32 | | - the following command: |
| 30 | + You may also run each of the test scripts independently, as in: |
33 | 31 |
|
34 | | - python DropTest.py |
| 32 | + python test_1000_module.py |
35 | 33 |
|
36 | | - Alternatively, the [SQL script][5] can be run directly via SQL\*Plus, which |
37 | | - will always prompt for the names of the schemas that will be dropped. Run |
38 | | - the script using the following command: |
| 34 | +3. After running the test suite, the schemas can be dropped by running the |
| 35 | + Python script [DropTest.py][4]. The script requires administrative |
| 36 | + privileges and will prompt for these credentials as well as the names of |
| 37 | + the schemas that will be dropped, unless a number of environment variables |
| 38 | + are set, as documented in the Python script [test_env.py][2]. Run the |
| 39 | + script using the following command: |
39 | 40 |
|
40 | | - sqlplus system/systempassword@hostname/servicename @sql/DropTest.sql |
| 41 | + python DropTest.py |
| 42 | + |
| 43 | + Alternatively, the [SQL script][5] can be run directly via SQL\*Plus, which |
| 44 | + will always prompt for the names of the schemas that will be dropped. Run |
| 45 | + the script using the following command: |
| 46 | + |
| 47 | + sqlplus system/systempassword@hostname/servicename @sql/DropTest.sql |
41 | 48 |
|
42 | 49 | [1]: https://github.com/oracle/python-cx_Oracle/blob/master/test/SetupTest.py |
43 | | -[2]: https://github.com/oracle/python-cx_Oracle/blob/master/test/TestEnv.py |
| 50 | +[2]: https://github.com/oracle/python-cx_Oracle/blob/master/test/test_env.py |
44 | 51 | [3]: https://github.com/oracle/python-cx_Oracle/blob/master/test/sql/SetupTest.sql |
45 | 52 | [4]: https://github.com/oracle/python-cx_Oracle/blob/master/test/DropTest.py |
46 | 53 | [5]: https://github.com/oracle/python-cx_Oracle/blob/master/test/sql/DropTest.sql |
0 commit comments