From 46aed4bca87d3491d404db048d0e0b3f0623bfe6 Mon Sep 17 00:00:00 2001 From: Evgeniy Blinov Date: Tue, 13 Feb 2024 23:17:26 +0300 Subject: [PATCH] tests --- tests/test_subprocess_result.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/test_subprocess_result.py diff --git a/tests/test_subprocess_result.py b/tests/test_subprocess_result.py new file mode 100644 index 0000000..f99d547 --- /dev/null +++ b/tests/test_subprocess_result.py @@ -0,0 +1,14 @@ +from suby.subprocess_result import SubprocessResult + + +def test_auto_id(): + assert SubprocessResult().id != SubprocessResult().id + assert isinstance(SubprocessResult().id, str) + assert len(SubprocessResult().id) > 10 + + +def test_default_values(): + assert SubprocessResult().stdout is None + assert SubprocessResult().stderr is None + assert SubprocessResult().returncode is None + assert SubprocessResult().killed_by_token == False