summaryrefslogtreecommitdiff
path: root/stacks/daemon/test_path_normalize.py
blob: c7b24e68bd98f477660e86a3874e2509f09b304e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Tests for legacy bcpr path normalization."""

from paths import MAX25_BCPR_KISS_DEFAULT, normalize_max25_bcpr_path


def test_normalize_legacy_tmp_bcpr():
    assert normalize_max25_bcpr_path("/tmp/bcpr/kiss-bc0") == "/tmp/max25-bcpr/kiss-bc0"
    assert normalize_max25_bcpr_path("/tmp/bcpr") == "/tmp/max25-bcpr"
    assert normalize_max25_bcpr_path("") == ""


def test_canonical_unchanged():
    assert (
        normalize_max25_bcpr_path("/tmp/max25-bcpr/kiss-bc0")
        == "/tmp/max25-bcpr/kiss-bc0"
    )
    assert MAX25_BCPR_KISS_DEFAULT == "/tmp/max25-bcpr/kiss-bc0"
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com