diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5dc8caa..593fd61 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/pycqa/isort - rev: 5.8.0 + rev: 5.12.0 hooks: - id: isort name: isort (python) @@ -11,27 +11,16 @@ repos: - id: isort name: isort (pyi) types: [pyi] - - - repo: https://github.com/psf/black - rev: 20.8b1 - hooks: - - id: black - language_version: python3 - entry: black . --check - - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.812 - hooks: - - id: mypy - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.27.1 + rev: v0.34.0 hooks: - id: markdownlint entry: markdownlint --ignore .github - repo: https://github.com/econchick/interrogate - rev: 1.4.0 + rev: 1.5.0 hooks: - id: interrogate args: [-vv, -i, --fail-under=80] + exclude: ^tests/ diff --git a/docs/conf.py b/docs/conf.py index c9f1c8e..3008278 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,11 +8,8 @@ sys.path.insert(0, os.path.abspath('..')) - -import sphinx_rtd_theme from s_tool import __version__ as _version - # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information diff --git a/examples/with_class_object.py b/examples/with_class_object.py deleted file mode 100644 index 50f777b..0000000 --- a/examples/with_class_object.py +++ /dev/null @@ -1,26 +0,0 @@ -"""Example code with class""" - -from s_tool.core import SeleniumTools - - -class SBot(SeleniumTools): - """Example Bot using s-tool""" - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - def run(self): - """Code to visit url and fetch cookies and basic info""" - url ="https://example.com" - self.get(url) - sessionid = self.sessionid() - url = self.url() - cookies = self.cookies() - - # print sessionid,url,cookies - print(f"\nurl : {url} \nsession : {sessionid}\ncookies : {cookies}\n") - - -bot = SBot(browser ="firefox", headless=True) # change headless=False to run with gui mode -bot.run() -bot.close() diff --git a/examples/with_context_manager.py b/examples/with_context_manager.py deleted file mode 100644 index 05cb58e..0000000 --- a/examples/with_context_manager.py +++ /dev/null @@ -1,12 +0,0 @@ -"""Example code with context manager""" - -from s_tool.driver import SeleniumDriver as SBot - -with SBot("firefox", headless=True) as self: - self.get("https://google.com") - sessionid = self.session() - url = self.url() - cookies = self.cookies() - - # print sessionid,url,cookies - print(f"\nurl : {url} \nsession : {sessionid}\ncookies : {cookies}\n") diff --git a/pyproject.toml b/pyproject.toml index bc8b5cd..707d453 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Ravishankar Chavare ", "Aahnik Daw + + + + """ + + expected_result = [('Option 1', '1'), ('Option 2', '2'), ('Option 3', '3')] + dropdown_options = self.parser.dropdown(html_string) + + self.assertEqual(expected_result,dropdown_options) + self.assertTrue(len(dropdown_options)==3) +