mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
* Migrate set() and frozenset() from the sandbox.
* Install the unittests, docs, newsitem, include file, and makefile update. * Exercise the new functions whereever sets.py was being used. Includes the docs for libfuncs.tex. Separate docs for the types are forthcoming.
This commit is contained in:
parent
d456849f19
commit
a690a9967e
21 changed files with 2338 additions and 40 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
import test.test_support, unittest
|
||||
from test.test_support import fcmp, have_unicode, TESTFN, unlink
|
||||
from sets import Set
|
||||
|
||||
import sys, warnings, cStringIO
|
||||
warnings.filterwarnings("ignore", "hex../oct.. of negative int",
|
||||
|
@ -1104,9 +1103,9 @@ class BuiltinTest(unittest.TestCase):
|
|||
get_vars_f2 = staticmethod(get_vars_f2)
|
||||
|
||||
def test_vars(self):
|
||||
self.assertEqual(Set(vars()), Set(dir()))
|
||||
self.assertEqual(set(vars()), set(dir()))
|
||||
import sys
|
||||
self.assertEqual(Set(vars(sys)), Set(dir(sys)))
|
||||
self.assertEqual(set(vars(sys)), set(dir(sys)))
|
||||
self.assertEqual(self.get_vars_f0(), {})
|
||||
self.assertEqual(self.get_vars_f2(), {'a': 1, 'b': 2})
|
||||
self.assertRaises(TypeError, vars, 42, 42)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue