Skip to content

Commit 1934fee

Browse files
committed
[pytest] open exception file with mode for python3
1 parent d958b5a commit 1934fee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/caffe/test/test_python_layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def python_net_file():
4343

4444

4545
def exception_net_file():
46-
with tempfile.NamedTemporaryFile(delete=False) as f:
46+
with tempfile.NamedTemporaryFile(mode='w+', delete=False) as f:
4747
f.write("""name: 'pythonnet' force_backward: true
4848
input: 'data' input_shape { dim: 10 dim: 9 dim: 8 }
4949
layer { type: 'Python' name: 'layer' bottom: 'data' top: 'top'

0 commit comments

Comments
 (0)