Conditions | 1 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import pytest |
||
4 | @pytest.fixture |
||
5 | def simple_memoize(): |
||
6 | from software_patterns import ObjectsPool |
||
7 | |||
8 | class TestClass: |
||
9 | def __init__(self, number, name): |
||
10 | self.number = number |
||
11 | self.name = name |
||
12 | |||
13 | @staticmethod |
||
14 | def factory_method(arg1, arg2, **kwargs): |
||
15 | return TestClass(arg1, arg2) |
||
16 | |||
17 | return ObjectsPool(TestClass.factory_method) |
||
18 | |||
34 |