From 22f2ff749891b611df88b2cd6b2722ab4ce75882 Mon Sep 17 00:00:00 2001 From: Wu Tingfeng Date: Thu, 22 Feb 2024 13:13:09 +0800 Subject: [PATCH] Use Ubuntu 20.04 --- .github/workflows/ci.yml | 8 ++++---- tests/main_test.py | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9ce3972..2344e0c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, windows-latest, ubuntu-latest] + os: [macos-latest, windows-latest, ubuntu-20.04] language: [ {python-version: "3.8.7", toxenv: "py38"}, @@ -16,11 +16,11 @@ jobs: {python-version: "pypy3.8", toxenv: "pypy38"}, ] include: - - os: ubuntu-latest + - os: ubuntu-20.04 language: {python-version: "3.8", toxenv: "codestyle"} - - os: ubuntu-latest + - os: ubuntu-20.04 language: {python-version: "3.8", toxenv: "lint"} - - os: ubuntu-latest + - os: ubuntu-20.04 language: {python-version: "3.8", toxenv: "typecheck"} runs-on: ${{ matrix.os }} steps: diff --git a/tests/main_test.py b/tests/main_test.py index 2266cc67..946e328b 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -154,11 +154,11 @@ def test_lenient_netloc() -> None: def test_looks_like_ip() -> None: """Test fallback function to check if a string looks like an IP address.""" - assert looks_like_ip("1.1.1.1", None) is True - assert looks_like_ip("1.1.1.01", None) is False - assert looks_like_ip("a.1.1.1", None) is False - assert looks_like_ip("1.1.1.1\n", None) is False - assert looks_like_ip("256.256.256.256", None) is False + assert looks_like_ip("1.1.1.1") is True + assert looks_like_ip("1.1.1.01") is False + assert looks_like_ip("a.1.1.1") is False + assert looks_like_ip("1.1.1.1\n") is False + assert looks_like_ip("256.256.256.256") is False def test_similar_to_ip() -> None: