Skip to content

Commit 49b036d

Browse files
committed
Test to ensure that bool(newstr(u'...')) == bool(u'...')
1 parent 8c76ca2 commit 49b036d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

future/tests/test_str.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ def test_str(self):
1919
self.assertEqual(str('blah'), u'blah') # u'' prefix: Py3.3 and Py2 only
2020
self.assertEqual(str(b'1234'), "b'1234'")
2121

22+
def test_bool_str(self):
23+
s1 = str(u'abc')
24+
s2 = u'abc'
25+
s3 = str(u'')
26+
s4 = u''
27+
self.assertEqual(bool(s1), bool(s2))
28+
self.assertEqual(bool(s3), bool(s4))
29+
2230
def test_os_path_join(self):
2331
"""
2432
Issue #15: can't os.path.join(u'abc', str(u'def'))

0 commit comments

Comments
 (0)