aboutsummaryrefslogtreecommitdiff
path: root/src/test/captured.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-09-11 22:20:15 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-09-11 22:20:15 +0200
commit958c410ba8b621a8a4d8caf04012028e7f151e0f (patch)
treee63465450b581afd2b631510e00b643efc5af9e7 /src/test/captured.py
parent2ffd95c295b117053f6e5430ba3ccc72beb224aa (diff)
downloadminishell_test-958c410ba8b621a8a4d8caf04012028e7f151e0f.tar.gz
minishell_test-958c410ba8b621a8a4d8caf04012028e7f151e0f.tar.bz2
minishell_test-958c410ba8b621a8a4d8caf04012028e7f151e0f.zip
Added comments
Diffstat (limited to 'src/test/captured.py')
-rw-r--r--src/test/captured.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/captured.py b/src/test/captured.py
index b42352e..f855212 100644
--- a/src/test/captured.py
+++ b/src/test/captured.py
@@ -6,7 +6,7 @@
# By: charles <me@cacharle.xyz> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/09/11 12:16:25 by charles #+# #+# #
-# Updated: 2020/09/11 20:08:00 by charles ### ########.fr #
+# Updated: 2020/09/11 20:42:05 by charles ### ########.fr #
# #
# ############################################################################ #
@@ -15,6 +15,12 @@ import config
class Captured:
def __init__(self, output: str, status: int, files_content: [str], is_timeout: bool = False):
+ """Captured class
+ output: captured content
+ status: command status
+ files_content: content of the files altered by the command
+ is_timeout: the command has timed out
+ """
lines = output.split('\n')
for i, l in enumerate(lines):
if l.find(config.REFERENCE_ERROR_BEGIN) == 0:
@@ -37,4 +43,5 @@ class Captured:
@staticmethod
def timeout():
+ """Create a new captured timeout"""
return Captured("", 0, [], is_timeout=True)