homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, amaury.forgeotdarc, belopolsky, benjamin.peterson, brett.cannon, eric.araujo, georg.brandl, ncoghlan, r.david.murray, terry.reedy, vstinner
Date 2011年01月21日.02:13:41
SpamBayes Score 0.02221259
Marked as misclassified No
Message-id <1295576025.96.0.420029004627.issue3080@psf.upfronthosting.co.za>
In-reply-to
Content
test_reprlib fails on Windows, because '\' in quoted '\\' in the filename on repr(module). Workaround:
*******
index b0dc4d7..e476941 100644
--- a/Lib/test/test_reprlib.py
+++ b/Lib/test/test_reprlib.py
@@ -234,7 +234,7 @@ class LongReprTest(unittest.TestCase):
 touch(os.path.join(self.subpkgname, self.pkgname + '.py'))
 from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import areallylongpackageandmodulenametotestreprtruncation
 eq(repr(areallylongpackageandmodulenametotestreprtruncation),
- "<module '%s' from '%s'>" % (areallylongpackageandmodulenametotestreprtruncation.__name__, areallylongpackageandmodulenametotestreprtruncation.__file__))
+ "<module %r from %r>" % (areallylongpackageandmodulenametotestreprtruncation.__name__, areallylongpackageandmodulenametotestreprtruncation.__file__))
 eq(repr(sys), "<module 'sys' (built-in)>")
 
 def test_type(self):
*******
It is maybe not a good idea to use %R to format the filename in module.__repr__().
History
Date User Action Args
2011年01月21日 02:13:46vstinnersetrecipients: + vstinner, brett.cannon, georg.brandl, terry.reedy, amaury.forgeotdarc, ncoghlan, belopolsky, benjamin.peterson, eric.araujo, Arfrever, r.david.murray
2011年01月21日 02:13:45vstinnersetmessageid: <1295576025.96.0.420029004627.issue3080@psf.upfronthosting.co.za>
2011年01月21日 02:13:41vstinnerlinkissue3080 messages
2011年01月21日 02:13:41vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /