[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
- [Bug-wget] [GSoC PATCH 00/11] Refactor Test Suite, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 01/11] create package misc, move ColourTerm.py to misc, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 02/11] from WgetTest.py move WgetFile to misc, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 03/11] fix a typo in Test-Proto.py, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 04/11] create package exc and move TestFailed to exc,
Zihang Chen <=
- [Bug-wget] [GSoC PATCH 05/11] create package conf where rules and hooks are put, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 06/11] move server classes to package server.protocol, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 07/11] create package test for test case classes, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 08/11] refactor a lot, see ChangeLog for detail, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 09/11] update README, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 10/11] ensure line feed at EOF and one blank line between methods, Zihang Chen, 2014/03/14
- [Bug-wget] [GSoC PATCH 11/11] in conf, rename register to rule and hook, Zihang Chen, 2014/03/14