Skip to content

Commit d216cdd

Browse files
committed
fix golang version regex in test
1 parent c2e432c commit d216cdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/languages/golang_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from __future__ import annotations
22

3-
import re
43
from unittest import mock
54

65
import pytest
6+
import re_assert
77

88
import pre_commit.constants as C
99
from pre_commit.languages import golang
@@ -40,4 +40,4 @@ def test_golang_infer_go_version_default():
4040
version = ACTUAL_INFER_GO_VERSION(C.DEFAULT)
4141

4242
assert version != C.DEFAULT
43-
assert re.match(r'^\d+\.\d+\.\d+$', version)
43+
re_assert.Matches(r'^\d+\.\d+(?:\.\d+)?$').assert_matches(version)

0 commit comments

Comments
 (0)