ajdavis / proporti.onl

Compare number of women, men, and nonbinary people among my friends and followers.

Home Page:https://www.proporti.onl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken unit test: “Should have guessed profile 'mum to one boy and one girl' was 'female', not 'male'”

lucaswerkmeister opened this issue · comments

Split off from #16 (comment).

$ python2.7 -m unittest discover -v
test_declared_gender (tests.test_declared_gender.TestDeclaredGender) ... FAIL

======================================================================
FAIL: test_declared_gender (tests.test_declared_gender.TestDeclaredGender)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/twitter-gender-distribution/tests/test_declared_gender.py", line 50, in test_declared_gender
    description, expected_gender, guess))
AssertionError: Should have guessed profile 'mum to one boy and one girl' was 'female', not 'male'

----------------------------------------------------------------------
Ran 1 test in 0.080s

FAILED (failures=1)

git bisect says that f272560 is the first bad commit. (Part of #10, so CC @raptortech-js.)

Yup, looks like I did that! You can definitely fix it by reverting part or all of f272560, though if you do that you will break, e.g., "guy who loves his mum." I'm not sure which formulation is more common, so I don't know if it makes more sense to change the test or change (back) the priority order

Regardless, I have no personal stake and I'm happy with whatever ends up happening :)