mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
fix issue with override tests clobbering each other by qualifying with module name
This commit is contained in:
parent
9ba23aa30b
commit
b539fec6cc
|
|
@ -481,6 +481,10 @@ def generate_tensor_like_override_tests(cls):
|
|||
|
||||
for func, override in get_testing_overrides().items():
|
||||
test_method = test_generator(func, override)
|
||||
module = func.__module__
|
||||
if module:
|
||||
name = 'test_{}_{}'.format(module.replace('.', '_'), func.__name__)
|
||||
else:
|
||||
name = 'test_{}'.format(func.__name__)
|
||||
test_method.__name__ = name
|
||||
setattr(cls, name, test_method)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user