diff --git a/release/update_manpages.py b/release/update_manpages.py index ecf51bb7a..fa7f90e24 100644 --- a/release/update_manpages.py +++ b/release/update_manpages.py @@ -30,8 +30,7 @@ import tempfile from typing import List -# NB: This script is currently imported by tests/ to unittest some logic. -assert sys.version_info >= (3, 6), "Python 3.6+ required" +assert sys.version_info >= (3, 9), "Release framework requires Python 3.9+" THIS_FILE = Path(__file__).resolve() @@ -182,7 +181,6 @@ def replace_regex(data): """ regex = ( (r"(It was generated by help2man) [0-9.]+", r"\g<1>."), - (r"^\033\[[0-9;]*m([^\033]*)\033\[m", r"\g<1>"), (r"^\.IP\n(.*:)\n", r".SS \g<1>\n"), (r"^\.PP\nDescription", r".SH DETAILS"), ) diff --git a/tests/test_update_manpages.py b/tests/test_update_manpages.py deleted file mode 100644 index f52f8575f..000000000 --- a/tests/test_update_manpages.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2022 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Unittests for the update_manpages module.""" - -from release import update_manpages - - -def test_replace_regex() -> None: - """Check that replace_regex works.""" - data = "\n\033[1mSummary\033[m\n" - assert update_manpages.replace_regex(data) == "\nSummary\n"