Skip to content

Commit 8bf3924

Browse files
committed
add missing @dbtest test-skip rules
Some newish tests lacked the @dbtest decorator which ensures that the test is skipped when a connection is not present.
1 parent de82d25 commit 8bf3924

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Internal
3333
* Refactor suggestion logic into declarative rules.
3434
* Factor the `--batch` execution modes out of `main.py`.
3535
* Sort coverage report in tox suite.
36+
* Skip more tests when a database connection is not present.
3637

3738

3839
1.67.1 (2026/03/28)

test/pytests/test_main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,13 @@ def test_select_from_empty_table(executor):
143143
assert expected in result.output
144144

145145

146+
@dbtest
146147
def test_is_valid_connection_scheme_valid(executor, capsys):
147148
is_valid, scheme = is_valid_connection_scheme(f"mysql://test@{DEFAULT_HOST}:{DEFAULT_PORT}/dev")
148149
assert is_valid
149150

150151

152+
@dbtest
151153
def test_is_valid_connection_scheme_invalid(executor, capsys):
152154
is_valid, scheme = is_valid_connection_scheme(f"nope://test@{DEFAULT_HOST}:{DEFAULT_PORT}/dev")
153155
assert not is_valid
@@ -2154,6 +2156,7 @@ def test_execute_arg_supersedes_batch_file(monkeypatch):
21542156
os.remove(batch_file.name)
21552157

21562158

2159+
@dbtest
21572160
def test_null_string_config(monkeypatch):
21582161
monkeypatch.setattr(MyCli, 'system_config_files', [])
21592162
monkeypatch.setattr(MyCli, 'pwd_config_file', os.devnull)

0 commit comments

Comments
 (0)