diff --git a/tests/bugs/core_3553_test.py b/tests/bugs/core_3553_test.py index 2596f8b5..5f9fe25b 100644 --- a/tests/bugs/core_3553_test.py +++ b/tests/bugs/core_3553_test.py @@ -39,10 +39,7 @@ fb5x_checked_stdout = """ @pytest.mark.version('>=3.0') def test_1(act: Action): - with act.connect_server() as srv: - engine_major = int(srv.info.engine_version) - - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout diff --git a/tests/bugs/core_3834_test.py b/tests/bugs/core_3834_test.py index 5ca53c60..2668ec10 100644 --- a/tests/bugs/core_3834_test.py +++ b/tests/bugs/core_3834_test.py @@ -41,9 +41,6 @@ fb5x_checked_stdout = """ @pytest.mark.version('>=3.0') def test_1(act: Action): - with act.connect_server() as srv: - engine_major = int(srv.info.engine_version) - - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout diff --git a/tests/bugs/core_4492_test.py b/tests/bugs/core_4492_test.py index 867b2315..1278d0e9 100644 --- a/tests/bugs/core_4492_test.py +++ b/tests/bugs/core_4492_test.py @@ -76,10 +76,7 @@ fb5x_checked_stdout = """ @pytest.mark.version('>=3.0.3') def test_1(act: Action): - with act.connect_server() as srv: - engine_major = int(srv.info.engine_version) - - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout diff --git a/tests/bugs/core_4528_test.py b/tests/bugs/core_4528_test.py index f05fe19d..b43c82f5 100644 --- a/tests/bugs/core_4528_test.py +++ b/tests/bugs/core_4528_test.py @@ -127,10 +127,7 @@ fb5x_checked_stdout = """ @pytest.mark.version('>=3.0') def test_1(act: Action): - with act.connect_server() as srv: - engine_major = int(srv.info.engine_version) - - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout diff --git a/tests/bugs/core_4809_test.py b/tests/bugs/core_4809_test.py index 96e70ae0..4ee36d50 100644 --- a/tests/bugs/core_4809_test.py +++ b/tests/bugs/core_4809_test.py @@ -203,11 +203,7 @@ fb5x_checked_stdout = """ @pytest.mark.version('>=3.0') def test_1(act: Action): - with act.connect_server() as srv: - engine_major = int(srv.info.engine_version) - - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout - + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout diff --git a/tests/bugs/core_5598_test.py b/tests/bugs/core_5598_test.py index 42041efe..97c9ea52 100644 --- a/tests/bugs/core_5598_test.py +++ b/tests/bugs/core_5598_test.py @@ -60,11 +60,8 @@ def test_1(act: Action): c = con.cursor() c.execute(f"insert into test(id, s) select row_number()over(), lpad('', 8191, 'Алексей, Łukasz, Máté, François, Jørgen, Νικόλαος') from rdb$types,rdb$types rows {MIN_RECS_TO_ADD}") con.commit() - engine_major = int(con.info.engine_version) - # - #act.expected_stdout = expected_stdout - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.isql(switches=['-q'], input=test_script) act.stdout = act.stdout.upper() assert act.clean_stdout == act.clean_expected_stdout diff --git a/tests/functional/arno/optimizer/test_opt_inner_join_merge_06.py b/tests/functional/arno/optimizer/test_opt_inner_join_merge_06.py index 1ae5ae5a..6d0e36f2 100644 --- a/tests/functional/arno/optimizer/test_opt_inner_join_merge_06.py +++ b/tests/functional/arno/optimizer/test_opt_inner_join_merge_06.py @@ -101,9 +101,6 @@ fb5x_checked_stdout = """ @pytest.mark.version('>=3.0') def test_1(act: Action): - with act.connect_server() as srv: - engine_major = int(srv.info.engine_version) - - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout diff --git a/tests/functional/arno/optimizer/test_opt_mixed_joins_02.py b/tests/functional/arno/optimizer/test_opt_mixed_joins_02.py index d979011f..bcf30e30 100644 --- a/tests/functional/arno/optimizer/test_opt_mixed_joins_02.py +++ b/tests/functional/arno/optimizer/test_opt_mixed_joins_02.py @@ -107,9 +107,6 @@ fb5x_checked_stdout = """ @pytest.mark.version('>=3.0') def test_1(act: Action): - with act.connect_server() as srv: - engine_major = int(srv.info.engine_version) - - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout diff --git a/tests/functional/arno/optimizer/test_opt_mixed_joins_05.py b/tests/functional/arno/optimizer/test_opt_mixed_joins_05.py index ba0bb65f..05a53d0d 100644 --- a/tests/functional/arno/optimizer/test_opt_mixed_joins_05.py +++ b/tests/functional/arno/optimizer/test_opt_mixed_joins_05.py @@ -129,9 +129,6 @@ fb5x_checked_stdout = """ @pytest.mark.version('>=3.0') def test_1(act: Action): - with act.connect_server() as srv: - engine_major = int(srv.info.engine_version) - - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout diff --git a/tests/functional/arno/optimizer/test_opt_mixed_joins_06.py b/tests/functional/arno/optimizer/test_opt_mixed_joins_06.py index 14ecb155..a927a4c1 100644 --- a/tests/functional/arno/optimizer/test_opt_mixed_joins_06.py +++ b/tests/functional/arno/optimizer/test_opt_mixed_joins_06.py @@ -124,9 +124,6 @@ fb5x_checked_stdout = """ @pytest.mark.version('>=3.0') def test_1(act: Action): - with act.connect_server() as srv: - engine_major = int(srv.info.engine_version) - - act.expected_stdout = fb3x_checked_stdout if engine_major < 5 else fb5x_checked_stdout + act.expected_stdout = fb3x_checked_stdout if act.is_version('<5') else fb5x_checked_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout