Skip to content

Commit 66d11ee

Browse files
casteryhfacebook-github-bot
authored andcommitted
BUCK for tests (#76)
Summary: automation Reviewed By: felipemello1 Differential Revision: D86159099
1 parent f718ae7 commit 66d11ee

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_resharding_ext.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7+
import os
78
from logging import getLogger
89

910
import pytest
@@ -14,6 +15,18 @@
1415

1516
logger = getLogger(__name__)
1617

18+
import pytest
19+
20+
21+
def slow_tests_enabled():
22+
return os.environ.get("TORCHSTORE_ENABLE_SLOW_TESTS", "0") == "1"
23+
24+
25+
requires_slow_tests_enabled = pytest.mark.skipif(
26+
not slow_tests_enabled(),
27+
reason="Slow tests are disabled by default, use TORCHSTORE_ENABLE_SLOW_TESTS=1 to enable them",
28+
)
29+
1730

1831
@pytest.mark.parametrize(*transport_plus_strategy_params())
1932
@pytest.mark.parametrize(
@@ -53,6 +66,7 @@ async def test_1d_resharding(
5366
)
5467

5568

69+
@requires_slow_tests_enabled
5670
@pytest.mark.parametrize(*transport_plus_strategy_params())
5771
@pytest.mark.asyncio
5872
async def test_2d_to_2d_resharding(strategy_params, use_rdma):

0 commit comments

Comments
 (0)