mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-11-26 19:18:06 +01:00
feat(title): add pascal_to_title function and corresponding tests
This commit is contained in:
1 parent
8926bebe06
commit
c8e01a38f4
2 files changed
+20
-1
No files matched your search
@@ -1,4 +1,4 @@
|
||||
from bec_widgets.utils.name_utils import pascal_to_snake, sanitize_namespace
|
||||
from bec_widgets.utils.name_utils import pascal_to_snake, pascal_to_title, sanitize_namespace
|
||||
|
||||
|
||||
def test_pascal_to_snake():
|
||||
@@ -6,6 +6,11 @@ def test_pascal_to_snake():
|
||||
assert pascal_to_snake("BECStatusWidget") == "bec_status_widget"
|
||||
|
||||
|
||||
def test_pascal_to_title():
|
||||
assert pascal_to_title("DigitalTwin") == "Digital Twin"
|
||||
assert pascal_to_title("BECStatusWidget") == "BEC Status Widget"
|
||||
|
||||
|
||||
def test_sanitize_namespace():
|
||||
assert sanitize_namespace("scan 1 / user") == "scan_1_user"
|
||||
assert sanitize_namespace(" beamline.state-1 ") == "beamline.state-1"
|
||||
|
||||
Reference in new issue
Block a user