From c9198f0a7867613ba2be1f5eb182a8c7dde547c2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 05:05:51 +0200 Subject: Merging upstream version 1.27.2. Signed-off-by: Daniel Baumann --- test/test_sqlexecute.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'test/test_sqlexecute.py') diff --git a/test/test_sqlexecute.py b/test/test_sqlexecute.py index 163c850..ca186bc 100644 --- a/test/test_sqlexecute.py +++ b/test/test_sqlexecute.py @@ -117,6 +117,7 @@ def test_multiple_queries_same_line_syntaxerror(executor): @dbtest +@pytest.mark.skipif(os.name == "nt", reason="Bug: fails on Windows, needs fixing, singleton of FQ not working right") def test_favorite_query(executor): set_expanded_output(False) run(executor, "create table test(a text)") @@ -136,6 +137,7 @@ def test_favorite_query(executor): @dbtest +@pytest.mark.skipif(os.name == "nt", reason="Bug: fails on Windows, needs fixing, singleton of FQ not working right") def test_favorite_query_multiple_statement(executor): set_expanded_output(False) run(executor, "create table test(a text)") @@ -159,6 +161,7 @@ def test_favorite_query_multiple_statement(executor): @dbtest +@pytest.mark.skipif(os.name == "nt", reason="Bug: fails on Windows, needs fixing, singleton of FQ not working right") def test_favorite_query_expanded_output(executor): set_expanded_output(False) run(executor, '''create table test(a text)''') @@ -195,16 +198,21 @@ def test_cd_command_without_a_folder_name(executor): @dbtest def test_system_command_not_found(executor): results = run(executor, 'system xyz') - assert_result_equal(results, status='OSError: No such file or directory', - assert_contains=True) + if os.name=='nt': + assert_result_equal(results, status='OSError: The system cannot find the file specified', + assert_contains=True) + else: + assert_result_equal(results, status='OSError: No such file or directory', + assert_contains=True) @dbtest def test_system_command_output(executor): + eol = os.linesep test_dir = os.path.abspath(os.path.dirname(__file__)) test_file_path = os.path.join(test_dir, 'test.txt') results = run(executor, 'system cat {0}'.format(test_file_path)) - assert_result_equal(results, status='mycli rocks!\n') + assert_result_equal(results, status=f'mycli rocks!{eol}') @dbtest -- cgit v1.2.3