Skip to content

Commit

Permalink
Skip distributed tests if not supported (pytorch#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
lynic authored and apaszke committed Jul 7, 2017
1 parent c3c7845 commit ebdec9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
MASTER_ADDR = '127.0.0.1'


if not dist.is_available():
print('Distributed not available, skipping tests')
sys.exit(0)


@contextmanager
def _lock():
lockfile = os.path.join(TEMP_DIR, 'lockfile')
Expand Down

0 comments on commit ebdec9a

Please sign in to comment.