You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I first mentioned this issue here and opening a separate issue as requested.
I don't have an error message to share because the test just hangs. However, I have been able to reproduce the error and I believe the issue is caused by freezegun.
The test in question uses the following Splinter configuration:
The following test fails with splinter.exceptions.ElementDoesNotExist: no elements could be found with text "Model does not exist"
class AdminTest(SplinterTestCase):
def setUp(self):
superuser = create_superuser()
self.browser.visit(self.live_server_url + "/admin/")
self.browser.fill("username", superuser.email)
self.browser.fill("password", "password")
self.browser.find_by_value('Log in').click()
def test_splinter_hang(self):
self.browser.find_by_text('Model does not exist').click()
self.assertTrue(True)
However, if I freeze the date, it hangs:
@freeze_time("2024-05-21")
class AdminTest(SplinterTestCase):
def setUp(self):
superuser = create_superuser()
self.browser.visit(self.live_server_url + "/admin/")
self.browser.fill("username", superuser.email)
self.browser.fill("password", "password")
self.browser.find_by_value('Log in').click()
def test_splinter_hang(self):
print(datetime.now())
self.browser.find_by_text('Model does not exist').click()
self.assertTrue(True)
I assume this is caused by freezegun stubbing datetime which is used for the wait_time object. I am able to get test failures when I manually stop and start freezegun (see below) so I probably could wrap splinter element finders with something like this but wondering if there's another way to make that work.
I first mentioned this issue here and opening a separate issue as requested.
I don't have an error message to share because the test just hangs. However, I have been able to reproduce the error and I believe the issue is caused by freezegun.
The test in question uses the following Splinter configuration:
The following test fails with
splinter.exceptions.ElementDoesNotExist: no elements could be found with text "Model does not exist"
However, if I freeze the date, it hangs:
I assume this is caused by freezegun stubbing datetime which is used for the wait_time object. I am able to get test failures when I manually stop and start freezegun (see below) so I probably could wrap splinter element finders with something like this but wondering if there's another way to make that work.
The text was updated successfully, but these errors were encountered: