Re: [Django] #10314: TestCase assert methods do not accept a msg parameter

2009-10-12 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
+---
  Reporter:  wwinham| Owner:  nobody
Status:  reopened   | Milestone:  1.2   
 Component:  Testing framework  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  1  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * milestone:  => 1.2

Comment:

 Marking as v1.2 so I remember to check this in.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10314: TestCase assert methods do not accept a msg parameter

2009-10-12 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
+---
  Reporter:  wwinham| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  1  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * status:  closed => reopened
  * needs_docs:  0 => 1
  * resolution:  wontfix =>

Comment:

 Reopening following discussion on django-dev that resolved to use the
 extra argument as a prefix to the internally generated error message of
 the assertions.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10314: TestCase assert methods do not accept a msg parameter

2009-10-08 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
+---
  Reporter:  wwinham| Owner:  nobody
Status:  closed | Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution:  wontfix|  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by russellm):

 If you want to discuss a wontfix, the right place is django-dev.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10314: TestCase assert methods do not accept a msg parameter

2009-10-08 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
+---
  Reporter:  wwinham| Owner:  nobody
Status:  closed | Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution:  wontfix|  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by christian.oud...@gmail.com):

 How would you suggest handling use cases such as the above code snippet
 without a msg parameter?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10314: TestCase assert methods do not accept a msg parameter

2009-10-07 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
+---
  Reporter:  wwinham| Owner:  nobody
Status:  closed | Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution:  wontfix|  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * status:  reopened => closed
  * resolution:  => wontfix

Comment:

 As sebleier noted, this is an ill-posed request. Assertions like
 assertFormError raised many different error messages, so a simple one-
 message parameterization will be insufficient.

 If there is a problem with a specific error message (as is suggested by
 comment 3), the the solution is to fix that error message. Suggestions
 welcome.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10314: TestCase assert methods do not accept a msg parameter

2009-10-01 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
+---
  Reporter:  wwinham| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by christian.oud...@gmail.com):

  * has_patch:  0 => 1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10314: TestCase assert methods do not accept a msg parameter

2009-10-01 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
+---
  Reporter:  wwinham| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by christian.oud...@gmail.com):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 Attached a patch which adds msg parameters to all django test case assert*
 functions.

 I didn't understand at first what you meant by having more than one
 exception raised, but now that I got into the code, I do. There are
 multiple ways that each assert method can fail. For example, in
 `assertContains`, it could have the wrong status code, not contain the
 text, or not contain the text the correct number of times. Each of these
 three outcomes has a different default message.

 However, I believe that there are cases where each of the default messages
 is inadequate. Take for example, a test that looks through pages for
 invalid template variables:

 {{{
 class TemplateTestCase(ClientTestCase):
 def testTemplateError(self):
 urls = [
 '/',
 '/home/',
 '/admin/',
 # etcetera ...
 ]
 for url in urls:
 response = self.client.get(url, follow=True)
 self.assertNotContains(
 response,
 settings.TEMPLATE_STRING_IF_INVALID,
 msg='Found an invalid variable in url %s' % url)
 }}}

 Without the message parameter, it would require print statements to
 determine which url actually failed.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10314: TestCase assert methods do not accept a msg parameter

2009-03-30 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
+---
  Reporter:  wwinham| Owner:  nobody
Status:  closed | Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by sebleier):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 Replying to [comment:1 Alex]:
 > No reason we shouldn't keep the same API.

 Django's test cases have the possibility of having more than one Exception
 being raised so it doesn't make sense for a single message to characterize
 the failure of the test.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10314: TestCase assert methods do not accept a msg parameter

2009-02-26 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
+---
  Reporter:  wwinham| Owner:  nobody
Status:  new| Milestone:
 Component:  Testing framework  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Alex):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 No reason we shouldn't keep the same API.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #10314: TestCase assert methods do not accept a msg parameter

2009-02-20 Thread Django
#10314: TestCase assert methods do not accept a msg parameter
---+
 Reporter:  wwinham|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Testing framework  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 django.test.TestCase assert methods, such as assertContains, do not accept
 a failure message as their final parameter, like the underlying unittest
 methods do.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---