print 'End-to-end'
print '=========='
-for z in path('examples/expected').glob("*.py.out"):
+for z in sorted(path('examples/expected').glob("*.py.out")):
x = re.sub('(examples/)expected/(.*).py.out', r'\1\2.dyna', z)
y = x + '.py.out'
print 'Doctests'
print '========'
-for x in path('test').glob("*/*.dynadoc"):
+for x in sorted(path('test').glob("*/*.dynadoc")):
print x,
sys.stdout.flush()
with file(x) as f:
if was == now:
# nothing to do.
return
+ # special handling for with_key, forks a second update
+ self.replace(self.build('$key/1', item), None) # always clear $key
+ if hasattr(now, 'fn') and now.fn == 'with_key/2':
+ now, key = now.args
+ self.replace(self.build('$key/1', item), key)
# delete existing value before so we can replace it
if was is not None:
self.push(item, was, delete=True)
self.set_error(item, (None, [(e, None)]))
else:
- # issue replacement update
-
- # special handling for with_key, forks into two updates
- if hasattr(now, 'fn') and now.fn == 'with_key/2':
- now, key = now.args
- self.replace(self.build('$key/1', item), key)
-
self.replace(item, now)
return now