Skip to content

Commit

Permalink
Fix variable binding
Browse files Browse the repository at this point in the history
  • Loading branch information
asi1024 authored and niboshi committed Jan 16, 2019
1 parent b402029 commit 630a2da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion chainer/testing/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,12 @@ def method_generator(base_method):
and base_method.__name__ not in method_names):
return None

# Bind to a new variable.
backend_config2 = backend_config

@functools.wraps(base_method)
def new_method(self, *args, **kwargs):
return base_method(self, backend_config, *args, **kwargs)
return base_method(self, backend_config2, *args, **kwargs)

# Apply test marks
for mark in marks:
Expand Down

0 comments on commit 630a2da

Please sign in to comment.