-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a option to disable the plugin (#25)
This is especially useful when debugging potential incompatibilites with the vanilla collection
- Loading branch information
Showing
5 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from torch.testing._internal.common_device_type import instantiate_device_type_tests | ||
from torch.testing._internal.common_utils import TestCase | ||
|
||
|
||
class TestFoo(TestCase): | ||
def test_bar(self, device): | ||
pass | ||
|
||
|
||
instantiate_device_type_tests(TestFoo, globals(), only_for="cpu") | ||
|
||
|
||
class TestSpam(TestCase): | ||
def test_ham(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import pytest | ||
|
||
|
||
@pytest.mark.parametrize("option", ["--disable-pytest-pytorch"]) | ||
def test_disable_pytest_pytorch(testdir, option): | ||
result = testdir.runpytest("--help") | ||
assert option in "\n".join(result.outlines) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters