Skip to content

Commit 47aa7fc

Browse files
author
Justus Pendleton
committed
make comments more readable per alexander's suggestion
1 parent ee38363 commit 47aa7fc

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/db_test_base.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: db_test_base.py,v 1.86 2007-08-29 16:40:20 jpend Exp $
18+
# $Id: db_test_base.py,v 1.87 2007-08-29 17:35:41 jpend Exp $
1919

2020
import unittest, os, shutil, errno, imp, sys, time, pprint, sets
2121

@@ -263,15 +263,20 @@ def testMultilinkChangeIterable(self):
263263
nosy=1)
264264
u1 = self.db.user.create(username='foo%s'%commit)
265265
u2 = self.db.user.create(username='bar%s'%commit)
266-
nid = self.db.issue.create(title="spam", nosy=set(u1)) # set
266+
# try a couple of the built-in iterable types to make
267+
# sure that we accept them and handle them properly
268+
# try a set as input for the multilink
269+
nid = self.db.issue.create(title="spam", nosy=set(u1))
267270
if commit: self.db.commit()
268271
self.assertEqual(self.db.issue.get(nid, "nosy"), [u1])
269272
self.assertRaises(TypeError, self.db.issue.set, nid,
270273
nosy='invalid type')
271-
self.db.issue.set(nid, nosy=tuple()) # tuple
274+
# test with a tuple
275+
self.db.issue.set(nid, nosy=tuple())
272276
if commit: self.db.commit()
273277
self.assertEqual(self.db.issue.get(nid, "nosy"), [])
274-
self.db.issue.set(nid, nosy=frozenset([u1,u2])) # frozenset
278+
# make sure we accept a frozen set
279+
self.db.issue.set(nid, nosy=frozenset([u1,u2]))
275280
if commit: self.db.commit()
276281
l = [u1,u2]; l.sort()
277282
m = self.db.issue.get(nid, "nosy"); m.sort()

0 commit comments

Comments
 (0)