mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\bugs\gh_7818_test.py: multi-line text is returned by con.info.firebird_version since firebird-driver 1.10.4+. We have to take in account only first line of it, thus make splitting it by delimiter = os.linesep.
This commit is contained in:
parent
64527cb994
commit
a72a4069c7
@ -11,6 +11,20 @@ DESCRIPTION:
|
|||||||
NOTES:
|
NOTES:
|
||||||
[01.11.2023] pzotov
|
[01.11.2023] pzotov
|
||||||
Checked on 6.0.0.104, 5.0.0.1259, 4.0.4.3009
|
Checked on 6.0.0.104, 5.0.0.1259, 4.0.4.3009
|
||||||
|
|
||||||
|
[09.05.2024] pzotov
|
||||||
|
In firebird-driver 1.10.4+ obtaining version via 'con.info.firebird_version' returns
|
||||||
|
MULTI-LINED data, i.e. server plus network listener plus client info, like this is done
|
||||||
|
by 'show version' command, e.g.:
|
||||||
|
========
|
||||||
|
WI-T6.0.0.348 Firebird 6.0 Initial
|
||||||
|
WI-T6.0.0.348 Firebird 6.0 Initial/tcp (HOME-AUX2)/P19:C
|
||||||
|
WI-T6.0.0.348 Firebird 6.0 Initial/tcp (HOME-AUX2)/P19:C
|
||||||
|
========
|
||||||
|
Because of this, we have to take in account only first line of this data (split text using os.linesep).
|
||||||
|
See letter from pcisar:
|
||||||
|
subj: "fb_info_crypt_key: how it can be obtained using firebird-driver ? // GH-5978, 2018",
|
||||||
|
date: 07-may-2024 13:59.
|
||||||
"""
|
"""
|
||||||
import getpass
|
import getpass
|
||||||
import pytest
|
import pytest
|
||||||
@ -25,7 +39,7 @@ act = python_act('db')
|
|||||||
def test_1(act: Action, capsys):
|
def test_1(act: Action, capsys):
|
||||||
os_user = getpass.getuser()
|
os_user = getpass.getuser()
|
||||||
with act.db.connect() as con:
|
with act.db.connect() as con:
|
||||||
fb_vers = con.info.firebird_version
|
fb_vers = con.info.firebird_version.split('\n')[0]
|
||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
|
|
||||||
test_sql = f"""
|
test_sql = f"""
|
||||||
|
Loading…
Reference in New Issue
Block a user