Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Attributes
test.test_set.TestBasicOpsMixedStringBytes Class Reference
Inheritance diagram for test.test_set.TestBasicOpsMixedStringBytes:
Inheritance graph
[legend]
Collaboration diagram for test.test_set.TestBasicOpsMixedStringBytes:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def tearDown
def test_repr
def test_print
def test_length
def test_self_equality
def test_equivalent_equality
def test_copy
def test_self_union
def test_empty_union
def test_union_empty
def test_self_intersection
def test_empty_intersection
def test_intersection_empty
def test_self_isdisjoint
def test_empty_isdisjoint
def test_isdisjoint_empty
def test_self_symmetric_difference
def test_empty_symmetric_difference
def test_self_difference
def test_empty_difference
def test_empty_difference_rev
def test_iteration
def test_pickling

Public Attributes

 case
 values
 set
 dup
 length
 repr

Private Attributes

 _warning_filters

Detailed Description

Definition at line 909 of file test_set.py.


Member Function Documentation

Definition at line 910 of file test_set.py.

00910 
00911     def setUp(self):
00912         self._warning_filters = support.check_warnings()
00913         self._warning_filters.__enter__()
00914         warnings.simplefilter('ignore', BytesWarning)
00915         self.case   = "string and bytes set"
00916         self.values = ["a", "b", b"a", b"b"]
00917         self.set    = set(self.values)
00918         self.dup    = set(self.values)
00919         self.length = 4
00920         self.repr   = "{'a', b'a', 'b', b'b'}"

Here is the caller graph for this function:

Definition at line 921 of file test_set.py.

00921 
00922     def tearDown(self):
00923         self._warning_filters.__exit__(None, None, None)
00924 
00925 #==============================================================================

Here is the caller graph for this function:

def test.test_set.TestBasicOps.test_copy (   self) [inherited]

Definition at line 756 of file test_set.py.

00756 
00757     def test_copy(self):
00758         self.assertEqual(self.set.copy(), self.dup)

Here is the call graph for this function:

Definition at line 807 of file test_set.py.

00807 
00808     def test_empty_difference(self):
00809         result = self.set - empty_set
00810         self.assertEqual(result, self.dup)

Here is the call graph for this function:

Definition at line 811 of file test_set.py.

00811 
00812     def test_empty_difference_rev(self):
00813         result = empty_set - self.set
00814         self.assertEqual(result, empty_set)

Here is the call graph for this function:

Definition at line 775 of file test_set.py.

00775 
00776     def test_empty_intersection(self):
00777         result = self.set & empty_set
00778         self.assertEqual(result, empty_set)

Here is the call graph for this function:

Definition at line 787 of file test_set.py.

00787 
00788     def test_empty_isdisjoint(self):
00789         result = self.set.isdisjoint(empty_set)
00790         self.assertEqual(result, True)

Here is the call graph for this function:

Definition at line 799 of file test_set.py.

00799 
00800     def test_empty_symmetric_difference(self):
00801         result = self.set ^ empty_set
00802         self.assertEqual(result, self.set)

Here is the call graph for this function:

def test.test_set.TestBasicOps.test_empty_union (   self) [inherited]

Definition at line 763 of file test_set.py.

00763 
00764     def test_empty_union(self):
00765         result = self.set | empty_set
00766         self.assertEqual(result, self.dup)

Here is the call graph for this function:

Definition at line 753 of file test_set.py.

00753 
00754     def test_equivalent_equality(self):
00755         self.assertEqual(self.set, self.dup)

Here is the call graph for this function:

Definition at line 779 of file test_set.py.

00779 
00780     def test_intersection_empty(self):
00781         result = empty_set & self.set
00782         self.assertEqual(result, empty_set)

Here is the call graph for this function:

Definition at line 791 of file test_set.py.

00791 
00792     def test_isdisjoint_empty(self):
00793         result = empty_set.isdisjoint(self.set)
00794         self.assertEqual(result, True)

Here is the call graph for this function:

def test.test_set.TestBasicOps.test_iteration (   self) [inherited]

Definition at line 815 of file test_set.py.

00815 
00816     def test_iteration(self):
00817         for v in self.set:
00818             self.assertIn(v, self.values)
00819         setiter = iter(self.set)
00820         # note: __length_hint__ is an internal undocumented API,
00821         # don't rely on it in your own programs
00822         self.assertEqual(setiter.__length_hint__(), len(self.set))

Here is the call graph for this function:

def test.test_set.TestBasicOps.test_length (   self) [inherited]

Definition at line 747 of file test_set.py.

00747 
00748     def test_length(self):
00749         self.assertEqual(len(self.set), self.length)

Here is the call graph for this function:

def test.test_set.TestBasicOps.test_pickling (   self) [inherited]

Definition at line 823 of file test_set.py.

00823 
00824     def test_pickling(self):
00825         p = pickle.dumps(self.set)
00826         copy = pickle.loads(p)
00827         self.assertEqual(self.set, copy,
00828                          "%s != %s" % (self.set, copy))
00829 
00830 #------------------------------------------------------------------------------

Here is the call graph for this function:

def test.test_set.TestBasicOps.test_print (   self) [inherited]

Definition at line 736 of file test_set.py.

00736 
00737     def test_print(self):
00738         try:
00739             fo = open(support.TESTFN, "w")
00740             fo.write(str(self.set))
00741             fo.close()
00742             fo = open(support.TESTFN, "r")
00743             self.assertEqual(fo.read(), repr(self.set))
00744         finally:
00745             fo.close()
00746             support.unlink(support.TESTFN)

Here is the call graph for this function:

def test.test_set.TestBasicOps.test_repr (   self) [inherited]

Definition at line 732 of file test_set.py.

00732 
00733     def test_repr(self):
00734         if self.repr is not None:
00735             self.assertEqual(repr(self.set), self.repr)

Here is the call graph for this function:

Definition at line 803 of file test_set.py.

00803 
00804     def test_self_difference(self):
00805         result = self.set - self.set
00806         self.assertEqual(result, empty_set)

Here is the call graph for this function:

Definition at line 750 of file test_set.py.

00750 
00751     def test_self_equality(self):
00752         self.assertEqual(self.set, self.set)

Here is the call graph for this function:

Definition at line 771 of file test_set.py.

00771 
00772     def test_self_intersection(self):
00773         result = self.set & self.set
00774         self.assertEqual(result, self.dup)

Here is the call graph for this function:

Definition at line 783 of file test_set.py.

00783 
00784     def test_self_isdisjoint(self):
00785         result = self.set.isdisjoint(self.set)
00786         self.assertEqual(result, not self.set)

Here is the call graph for this function:

Definition at line 795 of file test_set.py.

00795 
00796     def test_self_symmetric_difference(self):
00797         result = self.set ^ self.set
00798         self.assertEqual(result, empty_set)

Here is the call graph for this function:

def test.test_set.TestBasicOps.test_self_union (   self) [inherited]

Definition at line 759 of file test_set.py.

00759 
00760     def test_self_union(self):
00761         result = self.set | self.set
00762         self.assertEqual(result, self.dup)

Here is the call graph for this function:

def test.test_set.TestBasicOps.test_union_empty (   self) [inherited]

Definition at line 767 of file test_set.py.

00767 
00768     def test_union_empty(self):
00769         result = empty_set | self.set
00770         self.assertEqual(result, self.dup)

Here is the call graph for this function:


Member Data Documentation

Definition at line 911 of file test_set.py.

Definition at line 914 of file test_set.py.

Definition at line 917 of file test_set.py.

Definition at line 918 of file test_set.py.

Definition at line 919 of file test_set.py.

Definition at line 916 of file test_set.py.

Definition at line 915 of file test_set.py.


The documentation for this class was generated from the following file: