Vuer

vuer.workspace.test_workspace

Tests for the Workspace class.

test_workspace_init_no_args

python
def test_workspace_init_no_args()

Source

Test Workspace initialization with no arguments (defaults to '.').

test_workspace_init_single_string

python
def test_workspace_init_single_string()

Source

Test Workspace initialization with single string path.

test_workspace_init_single_path

python
def test_workspace_init_single_path()

Source

Test Workspace initialization with single Path object.

test_workspace_init_multiple_strings

python
def test_workspace_init_multiple_strings()

Source

Test Workspace initialization with multiple string paths.

test_workspace_init_mixed_args

python
def test_workspace_init_mixed_args()

Source

Test Workspace initialization with mixed string and Path args.

test_workspace_paths_is_tuple

python
def test_workspace_paths_is_tuple()

Source

Test that paths returns a tuple (immutable).

test_workspace_absolute_paths

python
def test_workspace_absolute_paths()

Source

Test absolute_paths property.

test_workspace_absolute_paths_multiple

python
def test_workspace_absolute_paths_multiple()

Source

Test absolute_paths with multiple overlay paths.

test_workspace_find_file

python
def test_workspace_find_file()

Source

Test find() with multiple search paths.

test_workspace_find_file_first_wins

python
def test_workspace_find_file_first_wins()

Source

Test that first matching path wins when file exists in multiple paths.

test_workspace_find_file_not_found

python
def test_workspace_find_file_not_found()

Source

Test find() returns None when file not found.

test_workspace_find_nested_path

python
def test_workspace_find_nested_path()

Source

Test find() with nested file paths.

test_workspace_repr_single

python
def test_workspace_repr_single()

Source

Test workspace string representation with single path.

test_workspace_repr_multiple

python
def test_workspace_repr_multiple()

Source

Test workspace string representation with multiple paths.

test_workspace_from_config_none

python
def test_workspace_from_config_none()

Source

Test workspace_from_config with None.

test_workspace_from_config_string

python
def test_workspace_from_config_string()

Source

Test workspace_from_config with string.

test_workspace_from_config_path

python
def test_workspace_from_config_path()

Source

Test workspace_from_config with Path.

test_workspace_from_config_list

python
def test_workspace_from_config_list()

Source

Test workspace_from_config with list.

test_workspace_from_config_workspace

python
def test_workspace_from_config_workspace()

Source

Test workspace_from_config with existing Workspace.

test_workspace_from_config_invalid_type

python
def test_workspace_from_config_invalid_type()

Source

Test workspace_from_config raises on invalid type.

test_workspace_overlay_precedence

python
def test_workspace_overlay_precedence()

Source

Test that overlay paths are searched in order.

test_workspace_link_registers_in_links

python
def test_workspace_link_registers_in_links()

Source

Test that link() registers in the _links dict.

test_workspace_link_normalizes_path

python
def test_workspace_link_normalizes_path()

Source

Test that link() normalizes paths (adds leading slash, strips trailing).

test_workspace_link_custom_method

python
def test_workspace_link_custom_method()

Source

Test link() with custom HTTP method.

test_workspace_link_no_request_param

python
def test_workspace_link_no_request_param()

Source

Test link() with callable that takes no parameters.

test_workspace_link_with_request_param

python
def test_workspace_link_with_request_param()

Source

Test link() with callable that takes request parameter.

test_workspace_unlink

python
def test_workspace_unlink()

Source

Test unlink() removes a link.

test_workspace_unlink_nonexistent

python
def test_workspace_unlink_nonexistent()

Source

Test unlink() returns False for nonexistent path.

test_workspace_unlink_normalizes_path

python
def test_workspace_unlink_normalizes_path()

Source

Test unlink() normalizes paths.

test_workspace_handle_link_bytes

python
async def test_workspace_handle_link_bytes()

Source

Test handle_link() returns bytes correctly.

test_workspace_handle_link_dict

python
async def test_workspace_handle_link_dict()

Source

Test handle_link() returns dict as JSON.

test_workspace_handle_link_blob

python
async def test_workspace_handle_link_blob()

Source

Test handle_link() returns Blob correctly.

test_workspace_handle_link_content_type_auto_detect

python
async def test_workspace_handle_link_content_type_auto_detect()

Source

Test handle_link() auto-detects content type from path extension.

test_workspace_handle_link_file

python
async def test_workspace_handle_link_file()

Source

Test handle_link() serves Path directly.

test_workspace_handle_link_file_not_found

python
async def test_workspace_handle_link_file_not_found()

Source

Test handle_link() returns 404 for missing file.

test_workspace_handle_link_static_bytes

python
async def test_workspace_handle_link_static_bytes()

Source

Test handle_link() serves bytes directly.

test_workspace_handle_link_callable_returns_path

python
async def test_workspace_handle_link_callable_returns_path()

Source

Test handle_link() handles callable returning Path.

test_workspace_handle_link_not_found

python
async def test_workspace_handle_link_not_found()

Source

Test handle_link() returns None for unknown path.

test_workspace_handle_link_optional_request

python
async def test_workspace_handle_link_optional_request()

Source

Test handle_link() calls handler with or without request based on signature.

test_workspace_link_dynamic_update

python
async def test_workspace_link_dynamic_update()

Source

Test that links can be added/removed dynamically.

test_jpg_encoder

python
def test_jpg_encoder()

Source

Test jpg() encodes numpy array to JPEG bytes.

test_png_encoder

python
def test_png_encoder()

Source

Test png() encodes numpy array to PNG bytes.

test_jpg_strips_alpha

python
def test_jpg_strips_alpha()

Source

Test jpg() strips alpha channel.

Public imports

These symbols are available from this module. Their definitions are documented in the linked modules.

  • Workspacevuer.workspace.workspace.Workspace
  • Blobvuer.workspace.workspace.Blob
  • workspace_from_configvuer.workspace.workspace.workspace_from_config
  • jpgvuer.workspace.encoders.jpg
  • pngvuer.workspace.encoders.png