Skip to content

Commit

Permalink
fix golang version regex in test
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Feb 1, 2023
1 parent c2e432c commit d216cdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/languages/golang_test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import annotations

import re
from unittest import mock

import pytest
import re_assert

import pre_commit.constants as C
from pre_commit.languages import golang
Expand Down Expand Up @@ -40,4 +40,4 @@ def test_golang_infer_go_version_default():
version = ACTUAL_INFER_GO_VERSION(C.DEFAULT)

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

0 comments on commit d216cdd

Please sign in to comment.