* [gentoo-commits] proj/layman:gsoc2014 commit in: layman/tests/
@ 2014-06-16 3:37 Brian Dolbec
2014-06-16 3:40 ` [gentoo-commits] proj/layman:master " Brian Dolbec
0 siblings, 1 reply; 2+ messages in thread
From: Brian Dolbec @ 2014-06-16 3:37 UTC (permalink / raw
To: gentoo-commits
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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
2014-06-16 3:37 [gentoo-commits] proj/layman:gsoc2014 commit in: layman/tests/ Brian Dolbec
@ 2014-06-16 3:40 ` Brian Dolbec
0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2014-06-16 3:40 UTC (permalink / raw
To: gentoo-commits
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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-16 3:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-16 3:37 [gentoo-commits] proj/layman:gsoc2014 commit in: layman/tests/ Brian Dolbec
2014-06-16 3:40 ` [gentoo-commits] proj/layman:master " Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox