From: "Brian Dolbec" <brian.dolbec@gmail.com> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/layman:gsoc2014 commit in: layman/tests/ Date: Mon, 16 Jun 2014 03:37:30 +0000 (UTC) [thread overview] Message-ID: <1402792601.d161e4fb9e41cdc841adb40b86ab6cbb5b01a0a2.dol-sen@gentoo> (raw) commit: d161e4fb9e41cdc841adb40b86ab6cbb5b01a0a2 Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> AuthorDate: Thu Jun 12 21:39:26 2014 +0000 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> CommitDate: Sun Jun 15 00:36:41 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=d161e4fb external.py: Adds py3 compatibility to tests Adds py3 urllib imports, print function updates, and implicit utf-8 decoding of test strings. --- layman/tests/external.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/layman/tests/external.py b/layman/tests/external.py index 82825e2..5882270 100755 --- a/layman/tests/external.py +++ b/layman/tests/external.py @@ -15,11 +15,15 @@ # '''Runs external (non-doctest) test cases.''' -import unittest import os -import tempfile import shutil -import urllib +import tempfile +import unittest +#Py3 +try: + import urllib.request as urllib +except ImportError: + import urllib from layman.dbbase import DbBase from layman.output import Message from layman.config import BareConfig @@ -35,8 +39,8 @@ class Unicode(unittest.TestCase): o = DbBase(config, [filename]) for verbose in (True, False): for t in o.list(verbose=verbose): - print t[0] - print + print(t[0].decode('utf-8')) + print() def test_184449(self): self._overlays_bug(184449)
WARNING: multiple messages have this Message-ID (diff)
From: "Brian Dolbec" <brian.dolbec@gmail.com> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/layman:master commit in: layman/tests/ Date: Mon, 16 Jun 2014 03:40:20 +0000 (UTC) [thread overview] Message-ID: <1402792601.d161e4fb9e41cdc841adb40b86ab6cbb5b01a0a2.dol-sen@gentoo> (raw) Message-ID: <20140616034020._1C7MOL4JI0lAViynjAEaXBl0bM5IBcANPoyxI0aIDg@z> (raw) commit: d161e4fb9e41cdc841adb40b86ab6cbb5b01a0a2 Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> AuthorDate: Thu Jun 12 21:39:26 2014 +0000 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> CommitDate: Sun Jun 15 00:36:41 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=d161e4fb external.py: Adds py3 compatibility to tests Adds py3 urllib imports, print function updates, and implicit utf-8 decoding of test strings. --- layman/tests/external.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/layman/tests/external.py b/layman/tests/external.py index 82825e2..5882270 100755 --- a/layman/tests/external.py +++ b/layman/tests/external.py @@ -15,11 +15,15 @@ # '''Runs external (non-doctest) test cases.''' -import unittest import os -import tempfile import shutil -import urllib +import tempfile +import unittest +#Py3 +try: + import urllib.request as urllib +except ImportError: + import urllib from layman.dbbase import DbBase from layman.output import Message from layman.config import BareConfig @@ -35,8 +39,8 @@ class Unicode(unittest.TestCase): o = DbBase(config, [filename]) for verbose in (True, False): for t in o.list(verbose=verbose): - print t[0] - print + print(t[0].decode('utf-8')) + print() def test_184449(self): self._overlays_bug(184449)
next reply other threads:[~2014-06-16 3:37 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-16 3:37 Brian Dolbec [this message] 2014-06-16 3:40 ` [gentoo-commits] proj/layman:master commit in: layman/tests/ Brian Dolbec
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1402792601.d161e4fb9e41cdc841adb40b86ab6cbb5b01a0a2.dol-sen@gentoo \ --to=brian.dolbec@gmail.com \ --cc=gentoo-commits@lists.gentoo.org \ --cc=gentoo-dev@lists.gentoo.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox