diff --git a/igelfs/filesystem.py b/igelfs/filesystem.py index aad0993..cb46121 100644 --- a/igelfs/filesystem.py +++ b/igelfs/filesystem.py @@ -214,7 +214,7 @@ def get_info(self, lxos_config: LXOSParser | None = None) -> dict[str, Any]: "path": self.path.as_posix(), "size": self.size, "section_count": self.section_count, - "partition_minors": sorted(self.partition_minors), + "partition_minors": sorted(self.partition_minors_by_directory), } if lxos_config: info["partition_names"] = [ diff --git a/igelfs/tests/test_filesystem.py b/igelfs/tests/test_filesystem.py new file mode 100644 index 0000000..0ac16a2 --- /dev/null +++ b/igelfs/tests/test_filesystem.py @@ -0,0 +1,11 @@ +"""Unit tests for the filesystem class.""" + +import pytest + +from igelfs import Filesystem + + +@pytest.mark.slow +def test_filesystem_partition_minors(filesystem: Filesystem) -> None: + """Test getting partition minors from filesystem.""" + assert filesystem.partition_minors == filesystem.partition_minors_by_directory diff --git a/pyproject.toml b/pyproject.toml index d513ea9..50d8e7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,5 +42,6 @@ warn_unused_ignores = true [tool.pytest.ini_options] markers = [ - "inf: tests require LXOS configuration file" + "inf: tests require LXOS configuration file", + "slow: tests take a while to complete", ]