[grassyknoll commit] r983 - in branches/unhork/grassyknoll: lib tests

0 views
Skip to first unread message

codesite...@google.com

unread,
Jan 5, 2009, 11:18:55 PM1/5/09
to grassykno...@googlegroups.com
Author: jemfinch
Date: Mon Jan 5 20:13:01 2009
New Revision: 983

Modified:
branches/unhork/grassyknoll/lib/Norman.py
branches/unhork/grassyknoll/tests/test_Norman.py

Log:
Issue #161: Changed Norman.NoneNorman to Norman.None_.


Modified: branches/unhork/grassyknoll/lib/Norman.py
==============================================================================
--- branches/unhork/grassyknoll/lib/Norman.py (original)
+++ branches/unhork/grassyknoll/lib/Norman.py Mon Jan 5 20:13:01 2009
@@ -319,7 +319,7 @@
def __call__(self, x):
return x

-class NoneNorman(Norman):
+class None_(Norman):
"""normalizes to None

Strings should be lower case.
@@ -333,7 +333,7 @@
def __init__(self, nones=None, **kwargs):
if nones is not None:
self.nones = nones
- super(NoneNorman, self).__init__(**kwargs)
+ super(None_, self).__init__(**kwargs)

@lowerString
def __call__(self, x):

Modified: branches/unhork/grassyknoll/tests/test_Norman.py
==============================================================================
--- branches/unhork/grassyknoll/tests/test_Norman.py (original)
+++ branches/unhork/grassyknoll/tests/test_Norman.py Mon Jan 5 20:13:01
2009
@@ -102,8 +102,8 @@
d = {}
assert norm(d) is d

-def test_NoneNorman():
- norm = Norman.NoneNorman()
+def test_None_():
+ norm = Norman.None_()
assert norm(None) is norm('null') is None
assert_raises(Norman.NormanError, norm, 0)

Reply all
Reply to author
Forward
0 new messages