jarus / flask-testing

Unittest extensions for Flask
http://pythonhosted.org/Flask-Testing/
Other
501 stars 110 forks source link

Test failures with python-3.4.3/3.5.1 #87

Closed dev-zero closed 8 years ago

dev-zero commented 8 years ago

Running the tests using: nosetests -e twill, I get:

.......................................F..F...
======================================================================
FAIL: test_assert_not_process_the_template (tests.test_utils.TestNotRenderTemplates)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/flask-testing/tests/test_utils.py", line 174, in test_assert_not_process_the_template
    assert "" == response.data
AssertionError

======================================================================
FAIL: test_assert_the_real_render_template_is_restored (tests.test_utils.TestRestoreTheRealRender)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/flask-testing/tests/test_utils.py", line 205, in test_assert_the_real_render_template_is_restored
    assert test_result.wasSuccessful()
AssertionError

----------------------------------------------------------------------
Ran 46 tests in 4.396s

FAILED (failures=2)
dev-zero commented 8 years ago

The first test fails due to comparison of a byte string with a unicode string. Using len(response.data) == 0 instead solves it. Second one is fixed with the first one fixed.