summaryrefslogtreecommitdiff
path: root/tests/share
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-05-11 21:46:35 +0200
committerClifford Wolf <clifford@clifford.at>2015-05-11 21:58:21 +0200
commitdae00e1d8301aae25f3432ca12995c9a3b380679 (patch)
treeb55a32f53afa4611a6c3a1ef824b2b22b95dcc2e /tests/share
parent42348cddd9218f198e93bc11909e7b118a71c9ba (diff)
changed file() to open() in python scripts
Diffstat (limited to 'tests/share')
-rw-r--r--tests/share/generate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/share/generate.py b/tests/share/generate.py
index bb96fec6..7f8a5951 100644
--- a/tests/share/generate.py
+++ b/tests/share/generate.py
@@ -25,7 +25,7 @@ def maybe_plus_x(expr):
return expr
for idx in range(100):
- with file('temp/uut_%05d.v' % idx, 'w') as f:
+ with open('temp/uut_%05d.v' % idx, 'w') as f:
with redirect_stdout(f):
if random.choice(['bin', 'uni']) == 'bin':
print('module uut_%05d(a, b, c, d, x, s, y);' % (idx))
@@ -60,7 +60,7 @@ for idx in range(100):
random.choice(['', '$signed', '$unsigned']), op, maybe_plus_x('b'),
random_plus_x() if random.randint(0, 4) == 0 else ''))
print('endmodule')
- with file('temp/uut_%05d.ys' % idx, 'w') as f:
+ with open('temp/uut_%05d.ys' % idx, 'w') as f:
with redirect_stdout(f):
print('read_verilog temp/uut_%05d.v' % idx)
print('proc;;')