2010-07-29 06:10:28 +08:00
|
|
|
"""
|
2011-09-07 05:12:26 +08:00
|
|
|
Unit tests for the stack formatting utilities
|
2010-07-29 06:10:28 +08:00
|
|
|
"""
|
|
|
|
|
|
2011-09-07 05:12:26 +08:00
|
|
|
# Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org>
|
2010-07-29 06:10:28 +08:00
|
|
|
# Copyright (c) 2010 Gael Varoquaux
|
|
|
|
|
# License: BSD Style, 3 clauses.
|
|
|
|
|
|
2011-04-29 16:48:03 +08:00
|
|
|
import nose
|
|
|
|
|
|
2010-07-29 06:10:28 +08:00
|
|
|
from ..format_stack import safe_repr
|
|
|
|
|
|
|
|
|
|
|
2011-12-18 07:12:22 +08:00
|
|
|
###############################################################################
|
2011-04-29 16:48:03 +08:00
|
|
|
|
|
|
|
|
class Vicious(object):
|
2010-07-29 06:10:28 +08:00
|
|
|
def __repr__(self):
|
|
|
|
|
raise ValueError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_safe_repr():
|
2011-04-29 16:48:03 +08:00
|
|
|
safe_repr(Vicious())
|