diff options
author | David Moss <drkjam@gmail.com> | 2017-01-16 22:17:16 +0000 |
---|---|---|
committer | David Moss <drkjam@gmail.com> | 2017-01-16 22:17:16 +0000 |
commit | 2ab73f10be7069c9412e853d2d0caf29bd624012 (patch) | |
tree | 4484049c4832a12e32ea21683a22b1ea96d880b6 | |
parent | 5e79f6a9d526c45a795a9cfd1bb81c6404415cc7 (diff) | |
download | netaddr-2ab73f10be7069c9412e853d2d0caf29bd624012.tar.gz |
- fixed broken tests in issue #149 (python 3 regression in 0.7.19) - only affects test suite
-rw-r--r-- | netaddr/tests/eui/test_ieee_parsers.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/netaddr/tests/eui/test_ieee_parsers.py b/netaddr/tests/eui/test_ieee_parsers.py index 7877f09..81f1faa 100644 --- a/netaddr/tests/eui/test_ieee_parsers.py +++ b/netaddr/tests/eui/test_ieee_parsers.py @@ -12,7 +12,7 @@ SAMPLE_DIR = os.path.dirname(__file__) def test_oui_parser_py2(): from cStringIO import StringIO outfile = StringIO() - with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile: + with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile: iab_parser = OUIIndexParser(infile) iab_parser.attach(FileIndexer(outfile)) iab_parser.parse() @@ -23,7 +23,7 @@ def test_oui_parser_py2(): def test_iab_parser_py2(): from cStringIO import StringIO outfile = StringIO() - with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile: + with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile: iab_parser = IABIndexParser(infile) iab_parser.attach(FileIndexer(outfile)) iab_parser.parse() @@ -34,7 +34,7 @@ def test_iab_parser_py2(): def test_oui_parser_py3(): from io import StringIO outfile = StringIO() - with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt')) as infile: + with open(os.path.join(SAMPLE_DIR, 'sample_oui.txt'), 'rb') as infile: iab_parser = OUIIndexParser(infile) iab_parser.attach(FileIndexer(outfile)) iab_parser.parse() @@ -45,7 +45,7 @@ def test_oui_parser_py3(): def test_iab_parser_py3(): from io import StringIO outfile = StringIO() - with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt')) as infile: + with open(os.path.join(SAMPLE_DIR, 'sample_iab.txt'), 'rb') as infile: iab_parser = IABIndexParser(infile) iab_parser.attach(FileIndexer(outfile)) iab_parser.parse() |