From f3c4a86b1dafa213911e617ffc7da245c4c19595 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Wed, 10 Jan 2024 22:46:27 +0100 Subject: [PATCH] tests --- catcli/nodes.py | 2 +- tests-ng/assets/generate.sh | 2 +- tests-ng/assets/github.catalog.json | 6 +++--- tests-ng/assets/github.catalog.native.txt | 10 +++++----- tests-ng/compare.sh | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/catcli/nodes.py b/catcli/nodes.py index 43371ff..3f19553 100644 --- a/catcli/nodes.py +++ b/catcli/nodes.py @@ -47,7 +47,7 @@ class NodeAny(NodeMixin): # type: ignore def __init__(self, # type: ignore[no-untyped-def] name=None, - size=None, + size=0, parent=None, children=None): """build generic node""" diff --git a/tests-ng/assets/generate.sh b/tests-ng/assets/generate.sh index a13c1c7..26f3acb 100755 --- a/tests-ng/assets/generate.sh +++ b/tests-ng/assets/generate.sh @@ -13,7 +13,7 @@ clean_catalog "tests-ng/assets/github.catalog.json" # native python3 -m catcli.catcli ls -r -s -B --catalog=tests-ng/assets/github.catalog.json | \ sed -e 's/free:.*%/free:0.0%/g' \ - -e 's/date:....-..-.. ..:..:../date:2023-03-09 16:20:59/g' \ + -e 's/....-..-.. ..:..:../2023-03-09 16:20:59/g' \ -e 's#du:[^|]* |#du:0/0 |#g' > tests-ng/assets/github.catalog.native.txt # csv diff --git a/tests-ng/assets/github.catalog.json b/tests-ng/assets/github.catalog.json index 4b02252..fbc0269 100644 --- a/tests-ng/assets/github.catalog.json +++ b/tests-ng/assets/github.catalog.json @@ -44,14 +44,14 @@ "name": "github", "size": 1662, "total": 0, - "ts": 1704922075, + "ts": 1704923096, "type": "storage" }, { "attr": { - "access": 1704922075, + "access": 1704923096, "access_version": "0.9.6", - "created": 1704922075, + "created": 1704923096, "created_version": "0.9.6" }, "name": "meta", diff --git a/tests-ng/assets/github.catalog.native.txt b/tests-ng/assets/github.catalog.native.txt index 3382e11..e1981cc 100644 --- a/tests-ng/assets/github.catalog.native.txt +++ b/tests-ng/assets/github.catalog.native.txt @@ -1,7 +1,7 @@ top └── storage: github [nbfiles:3|totsize:4865|free:0.0%|du:0/0|date:2023-03-09 16:20:59] - ├── FUNDING.yml 17 2022-10-19 21:00:37 [md5:0c6407a84d412c514007313fb3bca4de] - ├── codecov.yml 104 2024-01-03 23:25:10 [md5:4203204f75b43cd4bf032402beb3359d] - └── workflows 3082 2024-01-03 23:25:27 [nbfiles:2] - ├── pypi-release.yml 691 2022-10-19 21:00:37 [md5:57699a7a6a03e20e864f220e19f8e197] - └── testing.yml 850 2024-01-04 22:26:09 [md5:691df1a4d2f254b5cd04c152e7c6ccaf] + ├── FUNDING.yml 17 2023-03-09 16:20:59 [md5:0c6407a84d412c514007313fb3bca4de] + ├── codecov.yml 104 2023-03-09 16:20:59 [md5:4203204f75b43cd4bf032402beb3359d] + └── workflows 3082 2023-03-09 16:20:59 [nbfiles:2] + ├── pypi-release.yml 691 2023-03-09 16:20:59 [md5:57699a7a6a03e20e864f220e19f8e197] + └── testing.yml 850 2023-03-09 16:20:59 [md5:691df1a4d2f254b5cd04c152e7c6ccaf] diff --git a/tests-ng/compare.sh b/tests-ng/compare.sh index 6e66abd..d239590 100755 --- a/tests-ng/compare.sh +++ b/tests-ng/compare.sh @@ -102,7 +102,7 @@ native="${tmpd}/native.txt" ${bin} -B ls -s -r --format=native --catalog="${catalog}" > "${native}" mod="${tmpd}/native.mod.txt" cat "${native}" | sed -e 's/free:.*%/free:0.0%/g' \ - -e 's/date:....-..-.. ..:..:../date:2023-03-09 16:20:59/g' \ + -e 's/....-..-.. ..:..:../2023-03-09 16:20:59/g' \ -e 's#du:[^|]* |#du:0/0 |#g' > "${mod}" if command -v delta >/dev/null; then delta -s "tests-ng/assets/github.catalog.native.txt" "${mod}"