Skip to content

Commit a72a406

Browse files
committed
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.
1 parent 64527cb commit a72a406

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

tests/bugs/gh_7818_test.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@
1111
NOTES:
1212
[01.11.2023] pzotov
1313
Checked on 6.0.0.104, 5.0.0.1259, 4.0.4.3009
14+
15+
[09.05.2024] pzotov
16+
In firebird-driver 1.10.4+ obtaining version via 'con.info.firebird_version' returns
17+
MULTI-LINED data, i.e. server plus network listener plus client info, like this is done
18+
by 'show version' command, e.g.:
19+
========
20+
WI-T6.0.0.348 Firebird 6.0 Initial
21+
WI-T6.0.0.348 Firebird 6.0 Initial/tcp (HOME-AUX2)/P19:C
22+
WI-T6.0.0.348 Firebird 6.0 Initial/tcp (HOME-AUX2)/P19:C
23+
========
24+
Because of this, we have to take in account only first line of this data (split text using os.linesep).
25+
See letter from pcisar:
26+
subj: "fb_info_crypt_key: how it can be obtained using firebird-driver ? // GH-5978, 2018",
27+
date: 07-may-2024 13:59.
1428
"""
1529
import getpass
1630
import pytest
@@ -25,7 +39,7 @@
2539
def test_1(act: Action, capsys):
2640
os_user = getpass.getuser()
2741
with act.db.connect() as con:
28-
fb_vers = con.info.firebird_version
42+
fb_vers = con.info.firebird_version.split('\n')[0]
2943
cur = con.cursor()
3044

3145
test_sql = f"""

0 commit comments

Comments
 (0)