Mercurial > piecrust2
comparison piecrust/sources/fs.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 | 84fc72a17f7a |
children | 8adc27285d93 |
comparison
equal
deleted
inserted
replaced
978:7e51d14097cb | 979:45ad976712ec |
---|---|
150 if relationship == REL_LOGICAL_PARENT_ITEM: | 150 if relationship == REL_LOGICAL_PARENT_ITEM: |
151 # If we want the logical parent item of a folder, we find a | 151 # If we want the logical parent item of a folder, we find a |
152 # page file with the same name as the folder. | 152 # page file with the same name as the folder. |
153 if not item.is_group: | 153 if not item.is_group: |
154 raise ValueError() | 154 raise ValueError() |
155 parent_glob = os.path.join(item.spec, '*') | 155 parent_glob = item.spec.rstrip('/\\') + '.*' |
156 for n in glob.iglob(parent_glob): | 156 for n in glob.iglob(parent_glob): |
157 if os.path.isfile(n): | 157 if os.path.isfile(n): |
158 metadata = self._createItemMetadata(n) | 158 metadata = self._createItemMetadata(n) |
159 return ContentItem(n, metadata) | 159 return ContentItem(n, metadata) |
160 return None | 160 return None |