Mercurial > ~astiob > upreckon > hgweb
annotate upreckon/exceptions.py @ 171:161d78f52cc3 2.01
Fixed crashing on callable values of the tester conf. var.
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Sat, 18 Jun 2011 01:57:35 +0100 |
parents | d5b6708c1955 |
children | 65b5c9390010 |
rev | line source |
---|---|
146
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
1 # Copyright (c) 2010-2011 Chortos-2 <chortos@inbox.lv> |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
2 |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
3 __all__ = ('TestCaseNotPassed', 'TestCaseSkipped', 'TimeLimitExceeded', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
4 'CPUTimeLimitExceeded', 'WallTimeLimitExceeded', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
5 'MemoryLimitExceeded', 'CanceledByUser', 'WrongAnswer', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
6 'NonZeroExitCode', 'ExceptionWrapper', 'CannotStartTestee', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
7 'CannotStartValidator', 'CannotReadOutputFile', |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
8 'CannotReadInputFile', 'CannotReadAnswerFile') |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
9 |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
10 class TestCaseNotPassed(Exception): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
11 class TestCaseSkipped(TestCaseNotPassed): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
12 class TimeLimitExceeded(TestCaseNotPassed): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
13 class CPUTimeLimitExceeded(TimeLimitExceeded): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
14 class WallTimeLimitExceeded(TimeLimitExceeded): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
15 class MemoryLimitExceeded(TestCaseNotPassed): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
16 class CanceledByUser(TestCaseNotPassed): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
17 |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
18 class WrongAnswer(TestCaseNotPassed): |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
19 __slots__ = 'comment' |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
20 def __init__(self, comment=''): |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
21 self.comment = comment |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
22 |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
23 class NonZeroExitCode(TestCaseNotPassed): |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
24 __slots__ = 'exitcode' |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
25 def __init__(self, exitcode): |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
26 self.exitcode = exitcode |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
27 |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
28 class ExceptionWrapper(TestCaseNotPassed): |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
29 __slots__ = 'upstream' |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
30 def __init__(self, upstream): |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
31 self.upstream = upstream |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
32 |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
33 class CannotStartTestee(ExceptionWrapper): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
34 class CannotStartValidator(ExceptionWrapper): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
35 class CannotReadOutputFile(ExceptionWrapper): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
36 class CannotReadInputFile(ExceptionWrapper): __slots__ = () |
d5b6708c1955
Distutils support, reorganization and cleaning up
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff
changeset
|
37 class CannotReadAnswerFile(ExceptionWrapper): __slots__ = () |