From 3e4185913b584f5cc9a54f16f3c223861e11ec18 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Thu, 16 Apr 2026 17:14:23 +0200 Subject: Introduce a new marco - %e and migrate the project from GitHub to Codeberg --- tests/test_cli.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'tests/test_cli.py') diff --git a/tests/test_cli.py b/tests/test_cli.py index 953abf4..b7913da 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,5 +1,5 @@ # etoolkit -# Copyright (C) 2021-2024 Simeon Simeonov +# Copyright (C) 2021-2026 Simeon Simeonov # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -38,7 +38,6 @@ def test_decrypt_v1(binput, capsys, config_file, master_password): ): with pytest.raises(SystemExit) as exit_info: main(['-c', f'{config_file}', '-d']) - assert exit_info.type == SystemExit assert exit_info.value.code == 0 assert capsys.readouterr().out.strip() == 'Decrypted value: bar' @@ -60,7 +59,6 @@ def test_decrypt_v2( ): with pytest.raises(SystemExit) as exit_info: main(['-c', f'{config_file}', '-d']) - assert exit_info.type == SystemExit assert exit_info.value.code == 0 assert capsys.readouterr().out.strip() == ( f'Decrypted value: {short_value}' @@ -88,7 +86,6 @@ def test_encrypt_with_echo( ): with pytest.raises(SystemExit) as exit_info: main(['-c', f'{config_file}', '-e', '-E']) - assert exit_info.type == SystemExit assert exit_info.value.code == 0 assert capsys.readouterr().out.strip() == ( f'Encrypted value: {short_encrypted_value}' @@ -116,7 +113,6 @@ def test_encrypt_without_echo( ): with pytest.raises(SystemExit) as exit_info: main(['-c', f'{config_file}', '-e']) - assert exit_info.type == SystemExit assert exit_info.value.code == 0 assert capsys.readouterr().out.strip() == ( f'Encrypted value: {short_encrypted_value}' @@ -139,11 +135,9 @@ def test_list(capsys, config_file, nonexistent_config_file): with pytest.raises(SystemExit) as exit_info: main(['-c', nonexistent_config_file, '-l']) - assert exit_info.type == SystemExit assert exit_info.value.code == errno.EIO with pytest.raises(SystemExit) as exit_info: main(['-c', config_file, '-l']) - assert exit_info.type == SystemExit assert exit_info.value.code == 0 assert capsys.readouterr().out.strip() == f'dev{os.linesep}secret' @@ -153,7 +147,6 @@ def test_help(capsys): with pytest.raises(SystemExit) as exit_info: main(['-h']) - assert exit_info.type == SystemExit assert exit_info.value.code == 0 assert capsys.readouterr().out.startswith('usage: etoolkit') @@ -169,7 +162,6 @@ def test_generate_master_password_hash( urandom.return_value = non_random_bytes_32 with pytest.raises(SystemExit) as exit_info: main(['--generate-master-password-hash']) - assert exit_info.type == SystemExit assert exit_info.value.code == 0 assert capsys.readouterr().out.strip() == ( 'Master password hash: pbkdf2_sha256$500000$uYpZM1VfAGq0CDZL2duITs076' @@ -182,7 +174,6 @@ def test_version(capsys): with pytest.raises(SystemExit) as exit_info: main(['-v']) - assert exit_info.type == SystemExit assert exit_info.value.code == 0 assert capsys.readouterr().out.startswith( f'etoolkit {etoolkit.__version__}' -- cgit v1.3