Nick Coghlan wrote: > Walter Dörwald wrote: > >> test_string.py is supposed to test the string module. This new test >> should be moved to test_str.py (or even better to string_test.py, >> so that it can be reused for doing the same test with unicode objects). > > > Ah, I think I see where the tests should have gone > (MixinStrUnicodeUserStringTest.test_join in string_test.py). > > I'll work up a patch to bring those tests in sync with the rest of the > string tests (the structure of which I find harder to follow than the > string code itself. . .). However, I probably won't get to it for a week > or so. I'm working on it, however I discovered that unicode.join() doesn't optimize this special case: s = "foo" assert "".join([s]) is s u = u"foo" assert u"".join([s]) is s The second assertion fails. I'd say that this test (joining a one item sequence returns the item itself) should be removed because it tests an implementation detail. I'm not sure, whether the optimization should be added to unicode.find(). Bye, Walter Dörwald
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4