We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c2e432c + d216cdd commit 9868b1aCopy full SHA for 9868b1a
tests/languages/golang_test.py
@@ -1,9 +1,9 @@
1
from __future__ import annotations
2
3
-import re
4
from unittest import mock
5
6
import pytest
+import re_assert
7
8
import pre_commit.constants as C
9
from pre_commit.languages import golang
@@ -40,4 +40,4 @@ def test_golang_infer_go_version_default():
40
version = ACTUAL_INFER_GO_VERSION(C.DEFAULT)
41
42
assert version != C.DEFAULT
43
- assert re.match(r'^\d+\.\d+\.\d+$', version)
+ re_assert.Matches(r'^\d+\.\d+(?:\.\d+)?$').assert_matches(version)
0 commit comments