Hello everybody,

Sorry if this topic has already been brought, I asked about it on IRC but
nobody answered.

Being a old user of xUnit patterns in several languages, i just figured that
there might be a mistake in django testing documentation example.

The example is: self.assertEqual(self.lion.speak(), 'The lion says "roar"')

Which corresponds to: assertEqual(actual, expected)

Wheras the xUnit convention is: assertEqual(expected, actual)

For poeple who are not already aware of this decade old convention: "By
convention, the expected value is specified first and the actual value
follows it". Source:
http://xunitpatterns.com/Assertion%20Method.html#Equality Assertion

Apparently, Python's unittest assertEqual documentation does not mention
this convention:
http://docs.python.org/library/unittest.html#unittest.TestCase.assertEqual

Why do you think Python took such a position against a decade old convention
in every language i had the chance to test in ?

What's your position ?

Regards

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to