comparison piecrust/rendering.py @ 979:45ad976712ec

tests: Big push to get the tests to pass again. - Lots of fixes everywhere in the code. - Try to handle debug logging in the multiprocessing worker pool when running in pytest. Not perfect, but usable for now. - Replace all `.md` test files with `.html` since now a auto-format extension always sets the format. - Replace `out` with `outfiles` in most places since now blog archives are added to the bake output and I don't want to add expected outputs for blog archives everywhere.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 29 Oct 2017 22:51:57 -0700
parents 1bb704434ee2
children 8adc27285d93
comparison
equal deleted inserted replaced
978:7e51d14097cb 979:45ad976712ec
68 self._custom_info = {} 68 self._custom_info = {}
69 69
70 def setCustomInfo(self, key, info): 70 def setCustomInfo(self, key, info):
71 self._custom_info[key] = info 71 self._custom_info[key] = info
72 72
73 def getCustomInfo(self, key, default=None, create_if_missing=False): 73 def getCustomInfo(self, key, default=None):
74 if create_if_missing:
75 return self._custom_info.setdefault(key, default)
76 return self._custom_info.get(key, default) 74 return self._custom_info.get(key, default)
77 75
78 76
79 class RenderingContext(object): 77 class RenderingContext(object):
80 def __init__(self, page, *, sub_num=1, force_render=False): 78 def __init__(self, page, *, sub_num=1, force_render=False):