summaryrefslogtreecommitdiff
path: root/dev-python/icalendar/files/2.1_p20100409/06_all_test.py-use-set.patch
blob: cef265e3b34dab057b7b3e6f243d3eb7e56b7309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- test.py.orig	2010-04-25 09:19:36.000000000 -0400
+++ test.py	2010-04-25 09:26:23.000000000 -0400
@@ -77,7 +77,6 @@
 import traceback
 import linecache
 import pdb
-from sets import Set
 
 __metaclass__ = type
 
@@ -261,7 +260,7 @@
     """Returns a set of test case classes used in a test suite."""
     if not isinstance(suite, unittest.TestSuite):
         raise TypeError('not a TestSuite', suite)
-    results = Set()
+    results = set()
     for test in suite._tests:
         if isinstance(test, unittest.TestCase):
             results.add(test.__class__)
@@ -293,7 +292,7 @@
         if test_suite is None:
             continue
         if cfg.warn_omitted:
-            all_classes = Set(get_all_test_cases(module))
+            all_classes = set(get_all_test_cases(module))
             classes_in_suite = get_test_classes_from_testsuite(test_suite)
             difference = all_classes - classes_in_suite
             for test_class in difference:
@@ -320,7 +319,7 @@
 def get_test_hooks(test_files, cfg, tracer=None):
     """Returns a list of test hooks from a given list of test modules."""
     results = []
-    dirs = Set(map(os.path.dirname, test_files))
+    dirs = set(map(os.path.dirname, test_files))
     for dir in list(dirs):
         if os.path.basename(dir) == 'ftests':
             dirs.add(os.path.join(os.path.dirname(dir), 'tests'))