Blame SOURCES/0001-fixed-broken-tests-in-issue-149-python-3-regression-.patch

6af58a
From 2ab73f10be7069c9412e853d2d0caf29bd624012 Mon Sep 17 00:00:00 2001
6af58a
From: David Moss <drkjam@gmail.com>
6af58a
Date: Mon, 16 Jan 2017 22:17:16 +0000
6af58a
Subject: [PATCH] - fixed broken tests in issue #149 (python 3 regression in
6af58a
 0.7.19) - only affects test suite
6af58a
6af58a
---
6af58a
 netaddr/tests/eui/test_ieee_parsers.py | 8 ++++----
6af58a
 1 file changed, 4 insertions(+), 4 deletions(-)
6af58a
6af58a
diff --git a/netaddr/tests/eui/test_ieee_parsers.py b/netaddr/tests/eui/test_ieee_parsers.py
6af58a
index 7877f09..81f1faa 100644
6af58a
--- a/netaddr/tests/eui/test_ieee_parsers.py
6af58a
+++ b/netaddr/tests/eui/test_ieee_parsers.py
6af58a
@@ -12,7 +12,7 @@ SAMPLE_DIR = os.path.dirname(__file__)
6af58a
 def test_oui_parser_py2():
6af58a
     from cStringIO import StringIO
6af58a
     outfile = StringIO()
6af58a
-    with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile:
6af58a
+    with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile:
6af58a
         iab_parser = OUIIndexParser(infile)
6af58a
         iab_parser.attach(FileIndexer(outfile))
6af58a
         iab_parser.parse()
6af58a
@@ -23,7 +23,7 @@ def test_oui_parser_py2():
6af58a
 def test_iab_parser_py2():
6af58a
     from cStringIO import StringIO
6af58a
     outfile = StringIO()
6af58a
-    with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile:
6af58a
+    with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile:
6af58a
         iab_parser = IABIndexParser(infile)
6af58a
         iab_parser.attach(FileIndexer(outfile))
6af58a
         iab_parser.parse()
6af58a
@@ -34,7 +34,7 @@ def test_iab_parser_py2():
6af58a
 def test_oui_parser_py3():
6af58a
     from io import StringIO
6af58a
     outfile = StringIO()
6af58a
-    with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile:
6af58a
+    with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile:
6af58a
         iab_parser = OUIIndexParser(infile)
6af58a
         iab_parser.attach(FileIndexer(outfile))
6af58a
         iab_parser.parse()
6af58a
@@ -45,7 +45,7 @@ def test_oui_parser_py3():
6af58a
 def test_iab_parser_py3():
6af58a
     from io import StringIO
6af58a
     outfile = StringIO()
6af58a
-    with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile:
6af58a
+    with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile:
6af58a
         iab_parser = IABIndexParser(infile)
6af58a
         iab_parser.attach(FileIndexer(outfile))
6af58a
         iab_parser.parse()
6af58a
-- 
6af58a
2.9.3
6af58a