Skip to content

Commit 679bd7a

Browse files
committed
test exception raise for invalid session name
1 parent bac29ba commit 679bd7a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_cli.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,15 @@ def test_load_workspace(server, monkeypatch):
270270

271271

272272
def test_regression_00132_session_name_with_dots(tmpdir, server, session):
273-
server.new_session('any session')
274273
yaml_config = curjoin("workspacebuilder/regression_00132_dots.yaml")
275274
cli_args = [yaml_config]
276-
inputs = ['\n']
275+
inputs = []
277276
runner = CliRunner()
278277
result = runner.invoke(
279-
cli.command_load, cli_args, input=''.join(inputs))
280-
assert 'already running' not in result.output
278+
cli.command_load, cli_args, input=''.join(inputs),
279+
standalone_mode=False)
280+
assert result.exception
281+
assert isinstance(result.exception, libtmux.exc.BadSessionName)
281282

282283

283284
@pytest.mark.parametrize("cli_args", [

0 commit comments

Comments
 (0)