We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2eada01 commit f840fc5Copy full SHA for f840fc5
tests/utils.py
@@ -85,14 +85,14 @@ def skip_if_no_cpp_extention(obj):
85
"""
86
Skip the unit tests if the cpp extention isnt available
87
88
- return unittest.skipIf(not USE_COMPILED, "Skipping cpp extention tests")(obj)
+ return unittest.skipUnless(USE_COMPILED, "Skipping cpp extention tests")(obj)
89
90
91
def skip_if_no_cuda(obj):
92
93
Skip the unit tests if torch.cuda.is_available is False
94
95
- return unittest.skipIf(not torch.cuda.is_available(), "Skipping CUDA-based tests")(obj)
+ return unittest.skipUnless(torch.cuda.is_available(), "Skipping CUDA-based tests")(obj)
96
97
98
def skip_if_windows(obj):
0 commit comments