]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Rename test_package_initialization.py to (much shorter) test_import.py .
authorBrian Warner <warner@lothar.com>
Sat, 11 Jun 2011 19:02:34 +0000 (12:02 -0700)
committerBrian Warner <warner@lothar.com>
Sat, 11 Jun 2011 19:02:34 +0000 (12:02 -0700)
The former name was making my 'ls' listings hard to read, by forcing them
down to just two columns.

src/allmydata/test/test_import.py [new file with mode: 0644]
src/allmydata/test/test_package_initialization.py [deleted file]

diff --git a/src/allmydata/test/test_import.py b/src/allmydata/test/test_import.py
new file mode 100644 (file)
index 0000000..6ca7edf
--- /dev/null
@@ -0,0 +1,25 @@
+
+from twisted.trial import unittest
+
+import allmydata
+import mock
+
+real_import_func = __import__
+
+class T(unittest.TestCase):
+    @mock.patch('__builtin__.__import__')
+    def test_report_import_error(self, mockimport):
+        def raiseIE_from_this_particular_func(name, *args):
+            if name == "foolscap":
+                marker = "wheeeyo"
+                raise ImportError(marker + " foolscap cant be imported")
+            else:
+                return real_import_func(name, *args)
+
+        mockimport.side_effect = raiseIE_from_this_particular_func
+
+        vers_and_locs =  allmydata.get_package_versions_and_locations()
+        for (pkgname, stuff) in vers_and_locs:
+            if pkgname == 'foolscap':
+                self.failUnless('wheeeyo' in str(stuff[2]), stuff)
+                self.failUnless('raiseIE_from_this_particular_func' in str(stuff[2]), stuff)
diff --git a/src/allmydata/test/test_package_initialization.py b/src/allmydata/test/test_package_initialization.py
deleted file mode 100644 (file)
index 6ca7edf..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-
-from twisted.trial import unittest
-
-import allmydata
-import mock
-
-real_import_func = __import__
-
-class T(unittest.TestCase):
-    @mock.patch('__builtin__.__import__')
-    def test_report_import_error(self, mockimport):
-        def raiseIE_from_this_particular_func(name, *args):
-            if name == "foolscap":
-                marker = "wheeeyo"
-                raise ImportError(marker + " foolscap cant be imported")
-            else:
-                return real_import_func(name, *args)
-
-        mockimport.side_effect = raiseIE_from_this_particular_func
-
-        vers_and_locs =  allmydata.get_package_versions_and_locations()
-        for (pkgname, stuff) in vers_and_locs:
-            if pkgname == 'foolscap':
-                self.failUnless('wheeeyo' in str(stuff[2]), stuff)
-                self.failUnless('raiseIE_from_this_particular_func' in str(stuff[2]), stuff)