-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Description
🛠 Proposed Refactor
Use:
- 'pytest' not in sys.modules
+ 'PYTEST_CURRENT_TEST' not in os.environ
Here's the list of occurrences:
$ git grep pytest |grep sys.modules
torch_geometric/data/dataset.py:261: if self.log and 'pytest' not in sys.modules:
torch_geometric/data/dataset.py:272: if self.log and 'pytest' not in sys.modules:
torch_geometric/data/download.py:37: if log and 'pytest' not in sys.modules:
torch_geometric/data/download.py:41: if log and 'pytest' not in sys.modules:
torch_geometric/data/extract.py:10: if log and 'pytest' not in sys.modules:
torch_geometric/io/fs.py:120: if log and 'pytest' not in sys.modules:
torch_geometric/nn/dense/linear.py:265: MEASURE_ITER = 1 if 'pytest' in sys.modules else 3
torch_geometric/typing.py:51: if WITH_SEGMM and 'pytest' in sys.modules and torch.cuda.is_available():
Suggest a potential alternative/fix
n/a