aboutsummaryrefslogtreecommitdiff
path: root/src/test/error.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-01 11:49:53 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-01 11:49:53 +0200
commit1f18e740539aed751865ecff9d0f3cba44230e54 (patch)
treee23254751cc5a3be551233efb979a00571f40dc6 /src/test/error.py
parent763f02a8b1e69c0e26a088824981d23ba1e5386d (diff)
downloadphilosophers_test-1f18e740539aed751865ecff9d0f3cba44230e54.tar.gz
philosophers_test-1f18e740539aed751865ecff9d0f3cba44230e54.tar.bz2
philosophers_test-1f18e740539aed751865ecff9d0f3cba44230e54.zip
Refactoring file structure, Added summary
Diffstat (limited to 'src/test/error.py')
-rw-r--r--src/test/error.py62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/test/error.py b/src/test/error.py
deleted file mode 100644
index 51c3f7b..0000000
--- a/src/test/error.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# ############################################################################ #
-# #
-# ::: :::::::: #
-# error.py :+: :+: :+: #
-# +:+ +:+ +:+ #
-# By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ #
-# +#+#+#+#+#+ +#+ #
-# Created: 2020/09/29 09:09:31 by cacharle #+# #+# #
-# Updated: 2020/09/29 11:14:08 by cacharle ### ########.fr #
-# #
-# ############################################################################ #
-
-class Philo(Exception):
- pass
-
-
-class ShouldFail(Philo):
- def __init__(self, msg: str):
- self._msg = msg
- Philo.__init__(self)
-
- @property
- def full_summary(self):
- return self.summary
-
- @property
- def summary(self):
- return "Should fail: {}".format(self._msg)
-
-
-class Format(Philo):
- def __init__(self, line: str, msg: str):
- self._line = line
- self._msg = msg
- Philo.__init__(self)
-
- @property
- def full_summary(self):
- return """FORMAT ERROR: {}
-{}
-""".format(self._msg, self._line)
-
- @property
- def summary(self):
- return "format: {} {}".format(self._line, self._msg)
-
-
-class Log(Philo):
- def __init__(self, logs: [str], msg: str):
- self._logs = logs
- self._msg = msg
- Philo.__init__(self)
-
- @property
- def full_summary(self):
- return """LOG ERROR: {}
-{}
-""".format(self._msg, '\n'.join([str(l) for l in self._logs]))
-
- @property
- def summary(self):
- return "log: {}".format(self._msg)