| Conditions | 5 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | # -*- coding: utf-8 -*- |
||
| 19 | def test_pfindall(): |
||
| 20 | files = """ |
||
| 21 | a: |
||
| 22 | - a1.txt |
||
| 23 | - a1: |
||
| 24 | - a2: |
||
| 25 | - a3.txt |
||
| 26 | - a2.txt |
||
| 27 | """ |
||
| 28 | with create_files(files) as root: |
||
| 29 | root = Path(root) |
||
| 30 | |||
| 31 | assert dict(pfindall('a/a1/a2', 'a3.txt')) == { |
||
| 32 | 'a3.txt': root / 'a/a1/a2/a3.txt', |
||
| 33 | } |
||
| 34 | |||
| 35 | assert dict(pfindall('a/a1/a2', 'a2.txt', 'a3.txt')) == { |
||
| 36 | 'a3.txt': root / 'a/a1/a2/a3.txt', |
||
| 37 | 'a2.txt': root / 'a/a1/a2.txt', |
||
| 38 | } |
||
| 39 | |||
| 40 | assert dict(pfindall('a/a1/a2', 'a1.txt', 'a2.txt', 'a3.txt')) == { |
||
| 41 | 'a3.txt': root / 'a/a1/a2/a3.txt', |
||
| 45 |