bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] [GSoC PATCH 04/11] create package exc and move TestFailed to


From: Zihang Chen
Subject: [Bug-wget] [GSoC PATCH 04/11] create package exc and move TestFailed to exc
Date: Fri, 14 Mar 2014 21:18:20 +0800

 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  <address@hidden>
+       * exc: (new package) package for miscellaneous exceptions
+       * WgetTest.py: Move TestFailed to exc/test_failed.py.
+2014-03-13  Zihang Chen  <address@hidden>
        * Test-Proto.py: Fix a typo (line 71: server to servers).
 2014-03-13  Zihang Chen  <address@hidden>
        * 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]