caktus / caktus/django-scribbler

scribbler.tests.test_views.FunctionalTestCase.test_editor fails intermittently

Open
#129 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
114
Forks
13
PR merge metrics
No merged PRs in 30d

Description

test_editor sometimes fails locally, both running the tests with runtests.py and with tox. It does not appear to be restricted to any django/python version combination in particular when running tox; it is totally intermittent. It always fails with the error below when it does fail.

The text that the test is looking for in the element "div.scribble-content p:nth-child(2)" is not always present when the test looks for it.
#
## FAIL: test_editor (scribbler.tests.test_views.FunctionalTestCase)

Traceback (most recent call last):
File "/home/rlconley/PycharmProjects/django-scribbler-sandbox/scribbler/tests/test_views.py", line 448, in test_editor
self.assertEqual("This is a Test", text.text)
AssertionError: u'This is a Test' != u''
- This is a Test
-

Contributor guide

Open the contributing guide

Research direction

Start with scribbler/tests/test_views.py at line 448 and inspect FunctionalTestCase.test_editor, then reproduce the failure using runtests.py and tox. Check when div.scribble-content p:nth-child(2) is read and compare the intermittent empty value with the expected text. Done means the test passes reliably across repeated runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.