mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-29 13:06:24 -07:00
Comparisons to the singleton objects, like `True`, `False`, and `None`, should be done with identity, not equality. Use `is` or `is not`.
23 lines
532 B
Python
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
|