ska_pst.testutils.dsp

Submodule for working with DSP, such as working with the disk space.

class ska_pst.testutils.dsp.DiskSpaceUtil(lfs_mount: Path, logger: Optional[Logger] = None)[source]

Utility class for dealing with disk space during tests.

This class provides a wrapper for the current disk usage but also has the ability to fill the disk with files to consume a certain amount of space.

This can be used as a context manager to allow for cleanup of files even if there is an exception.

cleanup() None[source]

Clean up any files that may have been written by this instance.

create_tmp_file(fill_bytes: int) None[source]

Create a temporary file on the mount.

curr_disk_space() DiskUsage[source]

Get current disk space.

class ska_pst.testutils.dsp.DiskUsage(*, total: int, free: int, used: int)[source]

Data class exposing the disk usages of a mount.

All values are in bytes.

free: int
total: int
used: int