Create package exc and move TestFailed to exc

create mode 100644 testenv/exc/__init__.py
 create mode 100644 testenv/exc/test_failed.py
This commit is contained in:
Zihang Chen 2014-03-13 17:10:13 +08:00 committed by Giuseppe Scrivano
parent 82f44f303a
commit 42e482ad99
5 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2014-03-13 Zihang Chen <chsc4698@gmail.com>
* exc: (new package) package for miscellaneous exceptions
* WgetTest.py: Move TestFailed to exc/test_failed.py.
2014-03-13 Zihang Chen <chsc4698@gmail.com>
* Test-Proto.py: Fix a typo (line 71: server to servers).

View File

@ -26,6 +26,9 @@ Structure:
the acceptable elements and their uses. Typically, one must copy this file
and edit it for writing Test Cases.
* exc: This package contains custom exception classes used in this test
suite.
* misc: This package contains several helper modules used in this test
suite.
- colour_terminal.py: A custom module for printing coloured output to

View File

@ -9,16 +9,11 @@ import time
from subprocess import call
from misc.colour_terminal import print_red, print_green, print_blue
from difflib import unified_diff
from exc.test_failed import TestFailed
HTTP = "HTTP"
HTTPS = "HTTPS"
""" A Custom Exception raised by the Test Environment. """
class TestFailed (Exception):
def __init__ (self, error):
self.error = error
""" Class that defines methods common to both HTTP and FTP Tests. """

1
testenv/exc/__init__.py Normal file
View File

@ -0,0 +1 @@

View File

@ -0,0 +1,7 @@
class TestFailed(Exception):
""" A Custom Exception raised by the Test Environment. """
def __init__ (self, error):
self.error = error