|
3 | 3 | from .helpers.global_dataimportOsOperations |
4 | 4 | from .helpers.global_dataimportPortManager |
5 | 5 |
|
6 | | -from ..testgres.nodeimportPgVer |
7 | | -from ..testgres.nodeimportPostgresNode |
8 | | -from ..testgres.utilsimportget_pg_version2 |
9 | | -from ..testgres.utilsimportfile_tail |
10 | | -from ..testgres.utilsimportget_bin_path2 |
11 | | -from ..testgresimportProcessType |
12 | | -from ..testgresimportNodeStatus |
13 | | -from ..testgresimportIsolationLevel |
14 | | - |
15 | | -# New name prevents to collect test-functions in TestgresException and fixes |
16 | | -# the problem with pytest warning. |
17 | | -from ..testgresimportTestgresExceptionastestgres_TestgresException |
18 | | - |
19 | | -from ..testgresimportInitNodeException |
20 | | -from ..testgresimportStartNodeException |
21 | | -from ..testgresimportQueryException |
22 | | -from ..testgresimportExecUtilException |
23 | | -from ..testgresimportTimeoutException |
24 | | -from ..testgresimportInvalidOperationException |
25 | | -from ..testgresimportBackupException |
26 | | -from ..testgresimportProgrammingError |
27 | | -from ..testgresimportscoped_config |
28 | | -from ..testgresimportFirst,Any |
| 6 | +try: |
| 7 | +# Python 3.8 |
| 8 | +fromtestgres.nodeimportPgVer |
| 9 | +fromtestgres.nodeimportPostgresNode |
| 10 | +fromtestgres.utilsimportget_pg_version2 |
| 11 | +fromtestgres.utilsimportfile_tail |
| 12 | +fromtestgres.utilsimportget_bin_path2 |
| 13 | +fromtestgresimportProcessType |
| 14 | +fromtestgresimportNodeStatus |
| 15 | +fromtestgresimportIsolationLevel |
| 16 | + |
| 17 | +# New name prevents to collect test-functions in TestgresException and fixes |
| 18 | +# the problem with pytest warning. |
| 19 | +fromtestgresimportTestgresExceptionastestgres_TestgresException |
| 20 | + |
| 21 | +fromtestgresimportInitNodeException |
| 22 | +fromtestgresimportStartNodeException |
| 23 | +fromtestgresimportQueryException |
| 24 | +fromtestgresimportExecUtilException |
| 25 | +fromtestgresimportTimeoutException |
| 26 | +fromtestgresimportInvalidOperationException |
| 27 | +fromtestgresimportBackupException |
| 28 | +fromtestgresimportProgrammingError |
| 29 | +fromtestgresimportscoped_config |
| 30 | +fromtestgresimportFirst,Any |
| 31 | + |
| 32 | +exceptImportError: |
| 33 | +from ..testgres.nodeimportPgVer |
| 34 | +from ..testgres.nodeimportPostgresNode |
| 35 | +from ..testgres.utilsimportget_pg_version2 |
| 36 | +from ..testgres.utilsimportfile_tail |
| 37 | +from ..testgres.utilsimportget_bin_path2 |
| 38 | +from ..testgresimportProcessType |
| 39 | +from ..testgresimportNodeStatus |
| 40 | +from ..testgresimportIsolationLevel |
| 41 | + |
| 42 | +# New name prevents to collect test-functions in TestgresException and fixes |
| 43 | +# the problem with pytest warning. |
| 44 | +from ..testgresimportTestgresExceptionastestgres_TestgresException |
| 45 | + |
| 46 | +from ..testgresimportInitNodeException |
| 47 | +from ..testgresimportStartNodeException |
| 48 | +from ..testgresimportQueryException |
| 49 | +from ..testgresimportExecUtilException |
| 50 | +from ..testgresimportTimeoutException |
| 51 | +from ..testgresimportInvalidOperationException |
| 52 | +from ..testgresimportBackupException |
| 53 | +from ..testgresimportProgrammingError |
| 54 | +from ..testgresimportscoped_config |
| 55 | +from ..testgresimportFirst,Any |
29 | 56 |
|
30 | 57 | fromcontextlibimportcontextmanager |
31 | 58 |
|
|