Re: [Django] #27253: Use assertIsInstance() in test_force_text_lazy

2016-09-20 Thread Django
#27253: Use assertIsInstance() in test_force_text_lazy
-+-
 Reporter:  Chris Jerdonek   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Utilities|  Version:  master
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Chris Jerdonek):

 Okay, sorry.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.162edf54db89b1578d88f8b11e1d7a4b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27253: Use assertIsInstance() in test_force_text_lazy

2016-09-20 Thread Django
#27253: Use assertIsInstance() in test_force_text_lazy
-+-
 Reporter:  cjerdonek|Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Utilities|  Version:  master
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by timgraham):

 * status:  new => closed
 * needs_better_patch:   => 0
 * component:  Testing framework => Utilities
 * resolution:   => invalid
 * needs_tests:   => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Cleanup/optimization


Comment:

 That would change the assertion such that the test wouldn't act as a
 regression test for the original issue. The test would pass if the fix in
 70be31bba7f8658f17235e33862319780c3dfad1 were reverted.

 By the way, the 'Testing Framework' ticket component is for `django.test`
 issues, not for issues with Django's test suite. Use whatever component
 the tests are related to, or "Core (Other)" for cleanups that affect
 multiple test apps.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.d1a3903820deac1e286fb33d1fdb8631%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27253: Use assertIsInstance() in test_force_text_lazy

2016-09-20 Thread Django
#27253: Use assertIsInstance() in test_force_text_lazy
---+
 Reporter:  cjerdonek  |  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Testing framework  |Version:  master
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  1  |  UI/UX:  0
---+
 It looks like it would be cleaner / simpler to be using
 `assertIsInstance()` here
 
([https://github.com/django/django/blob/b5aac66b28c615b2bda63548cbd695dbb5a0c381/tests/utils_tests/test_encoding.py#L35
 direct code link]):

 {{{#!python
 def test_force_text_lazy(self):
 s = SimpleLazyObject(lambda: 'x')
 self.assertTrue(issubclass(type(force_text(s)), six.text_type))
 }}}

 So it would be:

 {{{#!python
 def test_force_text_lazy(self):
 s = SimpleLazyObject(lambda: 'x')
 self.assertIsInstance(force_text(s), six.text_type)
 }}}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.294db32b5f6d7163b8a4f8db52cc3509%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.