diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-03-02 14:33:51 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-03-02 14:33:51 +0100 |
| commit | 7cbaf473ca385cd64978a2d6f25f2df6af76bdb9 (patch) | |
| tree | 4110ad8e2e88dfd5b285fe4c4727f348b2b58f3b /tests/test/test_captured.py | |
| parent | aa79c9db6674deb205c7741e11d5520c76217b8d (diff) | |
| download | minishell_test-7cbaf473ca385cd64978a2d6f25f2df6af76bdb9.tar.gz minishell_test-7cbaf473ca385cd64978a2d6f25f2df6af76bdb9.tar.bz2 minishell_test-7cbaf473ca385cd64978a2d6f25f2df6af76bdb9.zip | |
Refactoring test.result.Result
Diffstat (limited to 'tests/test/test_captured.py')
| -rw-r--r-- | tests/test/test_captured.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/test/test_captured.py b/tests/test/test_captured.py index 2c085c6..3d4beca 100644 --- a/tests/test/test_captured.py +++ b/tests/test/test_captured.py @@ -6,26 +6,25 @@ # By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2021/03/01 15:55:11 by cacharle #+# #+# # -# Updated: 2021/03/01 16:19:23 by cacharle ### ########.fr # +# Updated: 2021/03/02 10:14:23 by cacharle ### ########.fr # # # # ############################################################################ # import pytest import copy -from minishell_test.test.captured import Captured +from minishell_test.test.captured import CapturedCommand, CapturedTimeout @pytest.fixture def captured(): - return Captured("foo", 0, ["file1", "file2"], False) + return CapturedCommand("foo", 0, ["file1", "file2"]) def test_init(captured): assert "foo" == captured.output assert 0 == captured.status assert ["file1", "file2"] == captured.files_content - assert not captured.is_timeout def test_eq(captured): @@ -42,9 +41,5 @@ def test_eq(captured): c2 = copy.deepcopy(captured) c2.files_content = ["asdfasdf"] assert captured != c2 - assert captured != Captured.timeout() - assert Captured.timeout() == Captured.timeout() - - -def test_timeout(): - assert Captured.timeout().is_timeout + assert captured != CapturedTimeout() + assert CapturedTimeout() == CapturedTimeout() |
