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

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