create mode 100644 testenv/exc/__init__.py create mode 100644 testenv/exc/test_failed.py
diff --git a/testenv/ChangeLog b/testenv/ChangeLog index f3e20c6..0bc03e0 100644 --- a/testenv/ChangeLog +++ b/testenv/ChangeLog @@ -1,4 +1,7 @@ 2014-03-13 Zihang Chen <[email protected]> + * exc: (new package) package for miscellaneous exceptions + * WgetTest.py: Move TestFailed to exc/test_failed.py. +2014-03-13 Zihang Chen <[email protected]> * Test-Proto.py: Fix a typo (line 71: server to servers). 2014-03-13 Zihang Chen <[email protected]> * WgetTest.py: Move WgetFile to package misc. diff --git a/testenv/WgetTest.py b/testenv/WgetTest.py index b07faa0..1b73d6a 100644 --- a/testenv/WgetTest.py +++ b/testenv/WgetTest.py @@ -9,18 +9,13 @@ from subprocess import call from difflib import unified_diff import HTTPServer +from exc.test_failed import TestFailed from misc.colour_terminal import print_red, print_green, print_blue 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. """ diff --git a/testenv/exc/__init__.py b/testenv/exc/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/testenv/exc/test_failed.py b/testenv/exc/test_failed.py new file mode 100644 index 0000000..3829f6a --- /dev/null +++ b/testenv/exc/test_failed.py @@ -0,0 +1,7 @@ + +class TestFailed(Exception): + + """ A Custom Exception raised by the Test Environment. """ + + def __init__ (self, error): + self.error = error \ No newline at end of file -- 1.8.3.2
