1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-29 13:06:24 -07:00
gochan/devtools/selenium_testing/tests/__init__.py
deepsource-autofix[bot] 65461034c1
refactor: use identity check for comparison to a singleton
Comparisons to the singleton objects, like `True`, `False`, and `None`, should be done with identity, not equality. Use `is` or `is not`.
2023-05-22 15:54:57 +00:00

23 lines
532 B
Python

from typing import Type
import unittest
from ..options import TestingOptions
options: TestingOptions = None
class SeleniumTestCase(unittest.TestCase):
@staticmethod
def add(suite: unittest.TestSuite, use_options: TestingOptions, test_class: Type[unittest.TestCase]):
global options
options = use_options
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_class))
@property
def options(self):
return options
@property
def driver(self):
if options is None:
return None
return options.driver