From 3a3742d80abac89c240eb084ef229de857ab5d06 Mon Sep 17 00:00:00 2001 From: Vasilis Vryniotis Date: Mon, 3 May 2021 10:03:26 +0100 Subject: [PATCH] Fix accept env var default value --- test/common_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/common_utils.py b/test/common_utils.py index c5b39c451a3..974390ce242 100644 --- a/test/common_utils.py +++ b/test/common_utils.py @@ -43,7 +43,7 @@ def set_rng_seed(seed): np.random.seed(seed) -ACCEPT = os.getenv('EXPECTTEST_ACCEPT') +ACCEPT = os.getenv('EXPECTTEST_ACCEPT', '0') == '1' TEST_WITH_SLOW = os.getenv('PYTORCH_TEST_WITH_SLOW', '0') == '1' @@ -121,7 +121,7 @@ def assertExpected(self, output, name, prec=None): pickable with `torch.save`. This file is placed in the 'expect' directory in the same directory as the test script. You can automatically update the recorded test - output using --accept. + output using an EXPECTTEST_ACCEPT=1 env variable. """ expected_file = self._get_expected_file(name)