File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import re
2+ import uuid
23
34import numpy as np
45import pytest
@@ -90,7 +91,7 @@ def test_branch_name(clean_repo):
9091 new_branch = clean_repo .get_new_output_branch_name ()
9192
9293 escaped_branch = re .escape (active_branch )
93- pattern = rf"^\d{{4}}-\d{{2}}-\d{{2}}_\d{{2}}-\d{{2}}-\d{{2}}_{ escaped_branch } _{ hash } $"
94+ pattern = rf"^\d{{4}}-\d{{2}}-\d{{2}}_\d{{2}}-\d{{2}}-\d{{2}}_{ escaped_branch } _{ hash } _[0-9a-f]{{6}} $"
9495 assert re .match (pattern , new_branch ), f"Branch name '{ new_branch } ' does not match expected format"
9596
9697
@@ -107,7 +108,7 @@ def test_branch_name_with_prefix(clean_repo):
107108 new_branch = clean_repo .get_new_output_branch_name (options .branch_prefix )
108109
109110 escaped_branch = re .escape (active_branch )
110- pattern = rf"^Test_Prefix_\d{{4}}-\d{{2}}-\d{{2}}_\d{{2}}-\d{{2}}-\d{{2}}_{ escaped_branch } _{ hash } $"
111+ pattern = rf"^Test_Prefix_\d{{4}}-\d{{2}}-\d{{2}}_\d{{2}}-\d{{2}}-\d{{2}}_{ escaped_branch } _{ hash } _[0-9a-f]{{6}} $"
111112 assert re .match (pattern , new_branch ), f"Branch name '{ new_branch } ' does not match expected format"
112113
113114
You can’t perform that action at this time.
0 commit comments