diff --git a/examples/wordle_test.py b/examples/wordle_test.py index 6d0ada8a6da..aa008b39cbd 100644 --- a/examples/wordle_test.py +++ b/examples/wordle_test.py @@ -64,6 +64,8 @@ def test_wordle(self): found_word = False for attempt in range(6): num_attempts += 1 + if len(self.word_list) == 0: + self.fail("Today's word was not found in my dictionary!") word = random.choice(self.word_list) letters = [] for letter in word: diff --git a/mkdocs_build/requirements.txt b/mkdocs_build/requirements.txt index 32cc5710576..34d5b36ce57 100644 --- a/mkdocs_build/requirements.txt +++ b/mkdocs_build/requirements.txt @@ -27,7 +27,7 @@ cssselect2==0.7.0 tinycss2==1.2.1 defusedxml==0.7.1 mkdocs==1.4.3 -mkdocs-material==9.1.16 +mkdocs-material==9.1.17 mkdocs-exclude-search==0.6.5 mkdocs-simple-hooks==0.1.5 mkdocs-material-extensions==1.1.1 diff --git a/requirements.txt b/requirements.txt index 6aab3b5138a..d1a7bc85314 100755 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ packaging>=23.1;python_version>="3.7" setuptools>=59.6.0;python_version<"3.7" setuptools>=68.0.0;python_version>="3.7" keyring>=23.4.1;python_version<"3.8" -keyring>=24.0.1;python_version>="3.8" +keyring>=24.1.1;python_version>="3.8" tomli>=1.2.3;python_version<"3.7" tomli>=2.0.1;python_version>="3.7" tqdm>=4.64.1;python_version<"3.7" @@ -19,7 +19,7 @@ certifi>=2023.5.7 filelock>=3.4.1;python_version<"3.7" filelock>=3.12.2;python_version>="3.7" platformdirs>=2.4.0;python_version<"3.7" -platformdirs>=3.7.0;python_version>="3.7" +platformdirs>=3.8.0;python_version>="3.7" parse>=1.19.1 pyparsing>=3.0.7;python_version<"3.7" pyparsing>=3.1.0;python_version>="3.7" @@ -34,7 +34,7 @@ chardet==5.1.0;python_version>="3.7" charset-normalizer==2.0.12;python_version<"3.7" charset-normalizer==3.1.0;python_version>="3.7" urllib3==1.26.12;python_version<"3.7" -urllib3>=1.26.15,<2.1.0;python_version>="3.7" +urllib3>=1.26.16,<2.1.0;python_version>="3.7" requests==2.27.1;python_version<"3.7" requests==2.31.0;python_version>="3.7" requests-toolbelt==1.0.0 @@ -61,7 +61,7 @@ pluggy==1.0.0;python_version<"3.7" pluggy==1.2.0;python_version>="3.7" py==1.11.0 pytest==7.0.1;python_version<"3.7" -pytest==7.3.2;python_version>="3.7" +pytest==7.4.0;python_version>="3.7" pytest-forked==1.4.0;python_version<"3.7" pytest-forked==1.6.0;python_version>="3.7" pytest-html==2.0.1 diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index 9f41d0e2e96..b16b9bb17a8 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.15.4" +__version__ = "4.15.5" diff --git a/seleniumbase/console_scripts/sb_mkrec.py b/seleniumbase/console_scripts/sb_mkrec.py index 1ea1c6be277..34d6311edcc 100644 --- a/seleniumbase/console_scripts/sb_mkrec.py +++ b/seleniumbase/console_scripts/sb_mkrec.py @@ -188,6 +188,14 @@ def main(): run_cmd = "%s -m pytest %s --rec -q -s --url=%s" % ( sys.executable, file_name, start_page ) + if '"' not in start_page: + run_cmd = '%s -m pytest %s --rec -q -s --url="%s"' % ( + sys.executable, file_name, start_page + ) + elif "'" not in start_page: + run_cmd = "%s -m pytest %s --rec -q -s --url='%s'" % ( + sys.executable, file_name, start_page + ) if use_edge: run_cmd += " --edge" if force_gui: diff --git a/seleniumbase/console_scripts/sb_recorder.py b/seleniumbase/console_scripts/sb_recorder.py index 15753a75bd8..3a43555b6cc 100644 --- a/seleniumbase/console_scripts/sb_recorder.py +++ b/seleniumbase/console_scripts/sb_recorder.py @@ -134,6 +134,16 @@ def do_recording(file_name, url, overwrite_enabled, use_chrome, window): "%s -m seleniumbase mkrec %s --url=%s --gui" % (sys.executable, file_name, url) ) + if '"' not in url: + command = ( + '%s -m seleniumbase mkrec %s --url="%s" --gui' + % (sys.executable, file_name, url) + ) + elif "'" not in url: + command = ( + "%s -m seleniumbase mkrec %s --url='%s' --gui" + % (sys.executable, file_name, url) + ) if not use_chrome: command += " --edge" if ( diff --git a/seleniumbase/fixtures/base_case.py b/seleniumbase/fixtures/base_case.py index 1ba708bff66..3be8af584a1 100644 --- a/seleniumbase/fixtures/base_case.py +++ b/seleniumbase/fixtures/base_case.py @@ -7667,9 +7667,9 @@ def reset_default_timeout(self): sb_config._is_timeout_changed = False self.__overrided_default_timeouts = False - def fail(self, msg=None): + def fail(self, msg="fail() called!"): """Fail immediately, with the given message.""" - super().fail(msg) + raise self.failureException(msg) def skip(self, reason=""): """Mark the test as Skipped.""" diff --git a/setup.py b/setup.py index 3bede4b6514..41ad03ff9e8 100755 --- a/setup.py +++ b/setup.py @@ -131,7 +131,7 @@ 'setuptools>=59.6.0;python_version<"3.7"', 'setuptools>=68.0.0;python_version>="3.7"', 'keyring>=23.4.1;python_version<"3.8"', - 'keyring>=24.0.1;python_version>="3.8"', + 'keyring>=24.1.1;python_version>="3.8"', 'tomli>=1.2.3;python_version<"3.7"', 'tomli>=2.0.1;python_version>="3.7"', 'tqdm>=4.64.1;python_version<"3.7"', @@ -145,7 +145,7 @@ 'filelock>=3.4.1;python_version<"3.7"', 'filelock>=3.12.2;python_version>="3.7"', 'platformdirs>=2.4.0;python_version<"3.7"', - 'platformdirs>=3.7.0;python_version>="3.7"', + 'platformdirs>=3.8.0;python_version>="3.7"', 'parse>=1.19.1', 'pyparsing>=3.0.7;python_version<"3.7"', 'pyparsing>=3.1.0;python_version>="3.7"', @@ -160,7 +160,7 @@ 'charset-normalizer==2.0.12;python_version<"3.7"', 'charset-normalizer==3.1.0;python_version>="3.7"', 'urllib3==1.26.12;python_version<"3.7"', - 'urllib3>=1.26.15,<2.1.0;python_version>="3.7"', + 'urllib3>=1.26.16,<2.1.0;python_version>="3.7"', 'requests==2.27.1;python_version<"3.7"', 'requests==2.31.0;python_version>="3.7"', 'requests-toolbelt==1.0.0', @@ -187,7 +187,7 @@ 'pluggy==1.2.0;python_version>="3.7"', "py==1.11.0", 'pytest==7.0.1;python_version<"3.7"', - 'pytest==7.3.2;python_version>="3.7"', + 'pytest==7.4.0;python_version>="3.7"', 'pytest-forked==1.4.0;python_version<"3.7"', 'pytest-forked==1.6.0;python_version>="3.7"', "pytest-html==2.0.1", # Newer ones had issues