|
| 1 | +import pytest |
| 2 | + |
| 3 | +from openflow.openflow import get_part |
| 4 | + |
| 5 | + |
| 6 | +@pytest.mark.parametrize( |
| 7 | + 'part, name, family, device, package', [ |
| 8 | + ('hx8k-ct256', 'hx8k-ct256', 'ice40', 'hx8k', 'ct256'), |
| 9 | + ('HX8K-CT256', 'hx8k-ct256', 'ice40', 'hx8k', 'ct256'), |
| 10 | + ('hx4k-tq144', 'hx4k-tq144', 'ice40', 'hx8k', 'tq144:4k'), |
| 11 | + ('25k-CSFBGA285', '25k-csfbga285', 'ecp5', '25k', 'csfbga285'), |
| 12 | + ('um5g-85k-CABGA381', 'um5g-85k-cabga381', 'ecp5', 'um5g-85k', 'cabga381') |
| 13 | + ] |
| 14 | +) |
| 15 | +def test_part(part, name, family, device, package): |
| 16 | + result = get_part(part) |
| 17 | + print(result) |
| 18 | + assert result['name'] == name |
| 19 | + assert result['family'] == family |
| 20 | + assert result['device'] == device |
| 21 | + assert result['package'] == package |
| 22 | + |
0 commit comments