Skip to content

Commit 99987ea

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

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_resharding_ext.py

Lines changed: 12 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
@@ -15,6 +16,16 @@
1516
logger = getLogger(__name__)
1617

1718

19+
def slow_tests_enabled():
20+
return os.environ.get("TORCHSTORE_ENABLE_SLOW_TESTS", "0") == "1"
21+
22+
23+
requires_slow_tests_enabled = pytest.mark.skipif(
24+
not slow_tests_enabled(),
25+
reason="Slow tests are disabled by default, use TORCHSTORE_ENABLE_SLOW_TESTS=1 to enable them",
26+
)
27+
28+
1829
@pytest.mark.parametrize(*transport_plus_strategy_params())
1930
@pytest.mark.parametrize(
2031
"put_mesh_shape,get_mesh_shape,put_sharding_dim,get_sharding_dim",
@@ -53,6 +64,7 @@ async def test_1d_resharding(
5364
)
5465

5566

67+
@requires_slow_tests_enabled
5668
@pytest.mark.parametrize(*transport_plus_strategy_params())
5769
@pytest.mark.asyncio
5870
async def test_2d_to_2d_resharding(strategy_params, use_rdma):

0 commit comments

Comments
 (0)