Hi Andrew,
On Sun, 6 Apr 2014, Chris Wilson wrote:
On Sun, 6 Apr 2014, Andrew Pashkin wrote:
* It makes it much harder to write custom assertions and get meaningful
display on error.
Can you give an examples for cases with messages/breakings and for custom
assertions?
I don't have an example of breakage to hand, I ripped out the offending code
in disgust and replaced it with standard assertions that worked. If I find
another example I'll be sure to let you know before I do the same again.
OK, here is one.
chris@lap-x201:~/projects/2014/webassets$ .ve/bin/tox -e py27 --
tests.test_filters:TestPyScss.test_search_path
GLOB sdist-make: /home/chris/projects/2014/webassets/setup.py
py27 inst-nodeps:
/home/chris/projects/2014/webassets/.tox/dist/webassets-0.10.dev.zip
py27 runtests: PYTHONHASHSEED='894115171'
py27 runtests: commands[0] | nosetests
tests.test_filters:TestPyScss.test_search_path
F
======================================================================
FAIL: tests.test_filters.TestPyScss.test_search_path
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/chris/projects/2014/webassets/.tox/py27/local/lib/python2.7/site-packages/nose/case.py",
line 197, in runTest
self.test(*self.arg)
File "/home/chris/projects/2014/webassets/tests/test_filters.py", line
969, in test_search_path
assert self.get('out.css') == 'h1 {\n color: #0000ff;\n}\na {\n
color: #ff8000;\n}\n'
AssertionError
----------------------------------------------------------------------
Ran 1 test in 0.055s
FAILED (failures=1)
"AssertionError". Gee, thanks. That helps a lot. So if the string wasn't
what we expected, what WAS it? How is this anywhere NEAR as useful as
self.assertEqual()?
Cheers, Chris.
--
Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838
Citylife House, Sturton Street, Cambridge, CB1 2QF, UK
Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.
--
You received this message because you are subscribed to the Google Groups "Django
developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/alpine.DEB.2.02.1404071049580.7500%40lap-x201.
For more options, visit https://groups.google.com/d/optout.