vuer.workspace.test_workspace
Tests for the Workspace class.
test_workspace_init_no_args
Test Workspace initialization with no arguments (defaults to '.').
test_workspace_init_single_string
Test Workspace initialization with single string path.
test_workspace_init_single_path
Test Workspace initialization with single Path object.
test_workspace_init_multiple_strings
Test Workspace initialization with multiple string paths.
test_workspace_init_mixed_args
Test Workspace initialization with mixed string and Path args.
test_workspace_paths_is_tuple
Test that paths returns a tuple (immutable).
test_workspace_absolute_paths
Test absolute_paths property.
test_workspace_absolute_paths_multiple
Test absolute_paths with multiple overlay paths.
test_workspace_find_file
Test find() with multiple search paths.
test_workspace_find_file_first_wins
Test that first matching path wins when file exists in multiple paths.
test_workspace_find_file_not_found
Test find() returns None when file not found.
test_workspace_find_nested_path
Test find() with nested file paths.
test_workspace_repr_single
Test workspace string representation with single path.
test_workspace_repr_multiple
Test workspace string representation with multiple paths.
test_workspace_from_config_none
Test workspace_from_config with None.
test_workspace_from_config_string
Test workspace_from_config with string.
test_workspace_from_config_path
Test workspace_from_config with Path.
test_workspace_from_config_list
Test workspace_from_config with list.
test_workspace_from_config_workspace
Test workspace_from_config with existing Workspace.
test_workspace_from_config_invalid_type
Test workspace_from_config raises on invalid type.
test_workspace_overlay_precedence
Test that overlay paths are searched in order.
test_workspace_link_registers_in_links
Test that link() registers in the _links dict.
test_workspace_link_normalizes_path
Test that link() normalizes paths (adds leading slash, strips trailing).
test_workspace_link_custom_method
Test link() with custom HTTP method.
test_workspace_link_no_request_param
Test link() with callable that takes no parameters.
test_workspace_link_with_request_param
Test link() with callable that takes request parameter.
test_workspace_unlink
Test unlink() removes a link.
test_workspace_unlink_nonexistent
Test unlink() returns False for nonexistent path.
test_workspace_unlink_normalizes_path
Test unlink() normalizes paths.
test_workspace_handle_link_bytes
Test handle_link() returns bytes correctly.
test_workspace_handle_link_dict
Test handle_link() returns dict as JSON.
test_workspace_handle_link_blob
Test handle_link() returns Blob correctly.
test_workspace_handle_link_content_type_auto_detect
Test handle_link() auto-detects content type from path extension.
test_workspace_handle_link_file
Test handle_link() serves Path directly.
test_workspace_handle_link_file_not_found
Test handle_link() returns 404 for missing file.
test_workspace_handle_link_static_bytes
Test handle_link() serves bytes directly.
test_workspace_handle_link_callable_returns_path
Test handle_link() handles callable returning Path.
test_workspace_handle_link_not_found
Test handle_link() returns None for unknown path.
test_workspace_handle_link_optional_request
Test handle_link() calls handler with or without request based on signature.
test_workspace_link_dynamic_update
Test that links can be added/removed dynamically.
test_jpg_encoder
Test jpg() encodes numpy array to JPEG bytes.
test_png_encoder
Test png() encodes numpy array to PNG bytes.
test_jpg_strips_alpha
Test jpg() strips alpha channel.
Public imports
These symbols are available from this module. Their definitions are documented in the linked modules.
Workspace—vuer.workspace.workspace.WorkspaceBlob—vuer.workspace.workspace.Blobworkspace_from_config—vuer.workspace.workspace.workspace_from_configjpg—vuer.workspace.encoders.jpgpng—vuer.workspace.encoders.png