From 05a85b358fb907d8fcb72f19390ee2ba5a2261a5 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 24 Feb 2019 11:50:56 -0800 Subject: [PATCH] Don't assume -1 for error code --- tests/test_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index ffc549f..73015a3 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -160,7 +160,7 @@ def test_create_index(db_path): ) ] == db["Gosh2"].indexes # Trying to create the same index should fail - assert -1 == CliRunner().invoke(cli.cli, create_index_unique_args).exit_code + assert 0 != CliRunner().invoke(cli.cli, create_index_unique_args).exit_code # ... unless we use --if-not-exists assert ( 0