Skip to content

Commit

Permalink
2.9.041
Browse files Browse the repository at this point in the history
  • Loading branch information
chapmanjacobd committed Aug 31, 2024
1 parent 7ca190b commit ff3df6c
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ To stop playing press Ctrl+C in either the terminal or mpv
<details><summary>List all subcommands</summary>

$ library
library (v2.9.040; 84 subcommands)
library (v2.9.041; 84 subcommands)

Create database subcommands:
╭─────────────────┬──────────────────────────────────────────╮
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def pytest_collection_modifyitems(config, items):

@pytest.fixture
def assert_unchanged(data_regression, request):
def assert_unchanged(captured):
data_regression.check(captured, basename=request.node.name.replace("-", " "))
def assert_unchanged(captured, basename=None):
data_regression.check(captured, basename=basename if basename else request.node.name.replace("-", " "))

return assert_unchanged

Expand Down
1 change: 0 additions & 1 deletion tests/files/test_sample_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
paths = [
"test.gif",
"test.hdf",
"test.html",
"test.mp4",
"test.nc",
"test.opus",
Expand Down
11 changes: 10 additions & 1 deletion tests/fsdb/test_disk_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@

from tests.utils import v_db
from xklb.__main__ import library as lb
from xklb.utils import consts

platform = "linux"
if consts.IS_WINDOWS:
platform = "windows"
elif consts.IS_MAC:
platform = "mac"


def test_disk_usage(assert_unchanged, capsys):
lb(["du", v_db, "--to-json"])
captured = capsys.readouterr().out
assert_unchanged([json.loads(line) for line in captured.strip().split("\n")])
assert_unchanged(
[json.loads(line) for line in captured.strip().split("\n")], basename=f"test_disk_usage.{platform}"
)
6 changes: 6 additions & 0 deletions tests/fsdb/test_disk_usage/test_disk_usage.mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- count: 1
path: https://
size: 0
- count: 4
path: /Users/
size: 276010
5 changes: 5 additions & 0 deletions tests/fsdb/test_disk_usage/test_disk_usage.windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- path: https://test/?tags%5B%5D=
size: null
- count: 4
path: D:\
size: 276010
2 changes: 1 addition & 1 deletion xklb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from xklb.utils import argparse_utils, iterables
from xklb.utils.log_utils import log

__version__ = "2.9.040"
__version__ = "2.9.041"

progs = {
"Create database subcommands": {
Expand Down

0 comments on commit ff3df6c

Please sign in to comment.