summaryrefslogtreecommitdiff
path: root/gerber/tests
diff options
context:
space:
mode:
Diffstat (limited to 'gerber/tests')
-rw-r--r--gerber/tests/test_common.py4
-rw-r--r--gerber/tests/test_excellon.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/gerber/tests/test_common.py b/gerber/tests/test_common.py
index 0ba4b68..7c66c0f 100644
--- a/gerber/tests/test_common.py
+++ b/gerber/tests/test_common.py
@@ -25,9 +25,9 @@ def test_file_type_detection():
def test_load_from_string():
- with open(NCDRILL_FILE, 'r') as f:
+ with open(NCDRILL_FILE, 'rU') as f:
ncdrill = loads(f.read())
- with open(TOP_COPPER_FILE, 'r') as f:
+ with open(TOP_COPPER_FILE, 'rU') as f:
top_copper = loads(f.read())
assert_true(isinstance(ncdrill, ExcellonFile))
assert_true(isinstance(top_copper, GerberFile))
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')