Mercurial > piecrust2
comparison tests/test_data_paginator.py @ 242:f130365568ff
internal: Code reorganization to put less stuff in `sources.base`.
Interfaces that sources can implement are in `sources.interfaces`. The default
page source is in `sources.default`. The `SimplePageSource` is gone since most
subclasses only wanted to do *some* stuff the same, but *lots* of stuff
slightly different. I may have to revisit the code to extract exactly the code
that's in common.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 18 Feb 2015 18:35:03 -0800 |
parents | f5ca5c5bed85 |
children | 498a917cd2d4 |
comparison
equal
deleted
inserted
replaced
241:85a6c7ba5e3b | 242:f130365568ff |
---|---|
1 import math | 1 import math |
2 import pytest | 2 import pytest |
3 from piecrust.data.base import IPaginationSource | |
4 from piecrust.data.paginator import Paginator | 3 from piecrust.data.paginator import Paginator |
4 from piecrust.sources.interfaces import IPaginationSource | |
5 | 5 |
6 | 6 |
7 class MockSource(list, IPaginationSource): | 7 class MockSource(list, IPaginationSource): |
8 def __init__(self, count): | 8 def __init__(self, count): |
9 for i in range(count): | 9 for i in range(count): |