From 7cbaf473ca385cd64978a2d6f25f2df6af76bdb9 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 2 Mar 2021 14:33:51 +0100 Subject: Refactoring test.result.Result --- tests/test/test_captured.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'tests/test/test_captured.py') 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 +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # 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() -- cgit