Add test for union with TruncatableSet.

This commit is contained in:
Valentin Lorentz 2014-07-31 15:50:26 +02:00
parent cab9fcdd8d
commit 00aaf79ef8

View File

@ -1153,6 +1153,12 @@ class TestTruncatableSet(SupyTestCase):
s.truncate(3)
self.assertEqual(s, {'bar', 'baz', 'qux'})
def testTruncateUnion(self):
s = TruncatableSet(['bar', 'foo'])
s |= {'baz', 'qux'}
s.truncate(3)
self.assertEqual(s, {'foo', 'baz', 'qux'})
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: