[Checkins] SVN: gocept.selenium/trunk/ better readable failure exceptions that include that name of the assertion, not just 'lambda'
Thomas Lotze
tl at gocept.com
Mon Mar 15 10:06:07 EDT 2010
Log message for revision 109976:
better readable failure exceptions that include that name of the assertion, not just 'lambda'
Changed:
U gocept.selenium/trunk/CHANGES.txt
U gocept.selenium/trunk/src/gocept/selenium/selenese.py
-=-
Modified: gocept.selenium/trunk/CHANGES.txt
===================================================================
--- gocept.selenium/trunk/CHANGES.txt 2010-03-15 10:24:08 UTC (rev 109975)
+++ gocept.selenium/trunk/CHANGES.txt 2010-03-15 14:06:07 UTC (rev 109976)
@@ -13,7 +13,10 @@
- Usability: raise a better readable exception when an unimplemented selenese
method is called.
+- Usability: raise failure exceptions that convey the name of the failed
+ assertion in spite of some lambdas wrapped around it.
+
0.3 (2010-01-12)
----------------
Modified: gocept.selenium/trunk/src/gocept/selenium/selenese.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/selenese.py 2010-03-15 10:24:08 UTC (rev 109975)
+++ gocept.selenium/trunk/src/gocept/selenium/selenese.py 2010-03-15 14:06:07 UTC (rev 109976)
@@ -265,6 +265,11 @@
# Internal
def __getattr__(self, name):
+ attr = self.__getattr(name)
+ attr.__name__ = name
+ return attr
+
+ def __getattr(self, name):
requested_name = name
if name.startswith('waitFor'):
name = name.replace('waitFor', 'assert', 1)
More information about the checkins
mailing list