diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-11-15 22:28:56 -0200 |
---|---|---|
committer | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-11-15 22:28:56 -0200 |
commit | 6e29b9bcae8167dbb9c75e5a79e09886b952e988 (patch) | |
tree | fbc04c024bacb192567e9fb5d112673bbf6c1600 /gerber/tests/test_excellon.py | |
parent | ebc85181975add0fd98c18441f029e9af696f237 (diff) | |
download | gerbonara-6e29b9bcae8167dbb9c75e5a79e09886b952e988.tar.gz gerbonara-6e29b9bcae8167dbb9c75e5a79e09886b952e988.tar.bz2 gerbonara-6e29b9bcae8167dbb9c75e5a79e09886b952e988.zip |
Use Python's universal newlines to open files
Diffstat (limited to 'gerber/tests/test_excellon.py')
-rw-r--r-- | gerber/tests/test_excellon.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gerber/tests/test_excellon.py b/gerber/tests/test_excellon.py index b821649..705adc3 100644 --- a/gerber/tests/test_excellon.py +++ b/gerber/tests/test_excellon.py @@ -16,7 +16,7 @@ NCDRILL_FILE = os.path.join(os.path.dirname(__file__), def test_format_detection(): """ Test file type detection """ - with open(NCDRILL_FILE) as f: + with open(NCDRILL_FILE, "rU") as f: data = f.read() settings = detect_excellon_format(data) assert_equal(settings['format'], (2, 4)) @@ -35,9 +35,9 @@ def test_read(): def test_write(): ncdrill = read(NCDRILL_FILE) ncdrill.write('test.ncd') - with open(NCDRILL_FILE) as src: + with open(NCDRILL_FILE, "rU") as src: srclines = src.readlines() - with open('test.ncd') as res: + with open('test.ncd', "rU") as res: for idx, line in enumerate(res): assert_equal(line.strip(), srclines[idx].strip()) os.remove('test.ncd') |