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 gvanrossum
Recipients alexandre.vassalotti, amaury.forgeotdarc, christian.heimes, draghuram, gvanrossum
Date 2007-11-09.00:42:13
SpamBayes Score 0.0028821712
Marked as misclassified No
Message-id <ca471dc20711081642p78061bd2na380c597a5a347c1@mail.gmail.com>
In-reply-to <1194548065.14.0.942752491397.issue1395@psf.upfronthosting.co.za>
Content
> Considering that test_csv is failing on windows even without any changes
> related to this issue, I looked at it and came up with this patch:
>
> -----------------
> Index: Lib/test/test_csv.py
> ===================================================================
> --- Lib/test/test_csv.py        (revision 58914)
> +++ Lib/test/test_csv.py        (working copy)
> @@ -375,7 +375,7 @@
>
>  class TestCsvBase(unittest.TestCase):
>      def readerAssertEqual(self, input, expected_result):
> -        with TemporaryFile("w+") as fileobj:
> +        with TemporaryFile("w+", newline='') as fileobj:
>              fileobj.write(input)
>              fileobj.seek(0)
>              reader = csv.reader(fileobj, dialect = self.dialect)
> -----------------
>
> Does this look ok? The tests pass on windows and Linux.

Yes, especially since writerAssertEqual() already uses that. :-)

I do think there is something iffy here -- the 2.x version of this
test opens the files in binary mode. I wonder what end users are
supposed to do.
History
Date User Action Args
2007-11-09 00:42:14gvanrossumsetspambayes_score: 0.00288217 -> 0.0028821712
recipients: + gvanrossum, amaury.forgeotdarc, draghuram, christian.heimes, alexandre.vassalotti
2007-11-09 00:42:13gvanrossumlinkissue1395 messages
2007-11-09 00:42:13gvanrossumcreate