#19546: Add logging configuration to test_sqlite.py --------------------------------------+------------------------------------ Reporter: bak1an | Owner: nobody Type: Cleanup/optimization | Status: new Component: Testing framework | Version: master Severity: Release blocker | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 1 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 --------------------------------------+------------------------------------
Comment (by aaugustin): Would it be easier to capture stderr entirely? {{{ from StringIO import StringIO # needs Python 3 compatible import import sys new_stderr = StringIO() old_stderr, sys.stderr = sys.stderr, new_stderr try: warnings.warn('Foo Deprecated', DeprecationWarning) self.assertIn('Foo Deprecated', output.getvalue()) finally: sys.stderr = old_stderr }}} -- Ticket URL: <https://code.djangoproject.com/ticket/19546#comment:9> Django <https://code.djangoproject.com/> 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 https://groups.google.com/groups/opt_out.