Skip to content

Commit 833f895

Browse files
committed
fix unit test
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
1 parent 1c4c2d6 commit 833f895

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

sdk/python/feast/repo_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def init_repo(repo_name: str, template: str):
507507

508508
def is_valid_name(name: str) -> bool:
509509
"""A name should be alphanumeric values, underscores, and hyphens but not start with an underscore"""
510-
return not name.startswith("_") and re.compile(r"[^\w-]+").search(name) is None
510+
return not name.startswith(("_", "-")) and not name.startswith("-") and re.compile(r"[^\w-]+").search(name) is None
511511

512512

513513
def generate_project_name() -> str:

sdk/python/tests/unit/infra/scaffolding/test_repo_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def test_invalid_project_name():
169169
_test_config(
170170
dedent(
171171
"""
172-
project: foo-1
172+
project: -foo
173173
registry: "registry.db"
174174
provider: local
175175
"""

0 commit comments

Comments
 (0)