summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--release/update_manpages.py4
-rw-r--r--tests/test_update_manpages.py23
2 files changed, 1 insertions, 26 deletions
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
30from typing import List 30from typing import List
31 31
32 32
33# NB: This script is currently imported by tests/ to unittest some logic. 33assert sys.version_info >= (3, 9), "Release framework requires Python 3.9+"
34assert sys.version_info >= (3, 6), "Python 3.6+ required"
35 34
36 35
37THIS_FILE = Path(__file__).resolve() 36THIS_FILE = Path(__file__).resolve()
@@ -182,7 +181,6 @@ def replace_regex(data):
182 """ 181 """
183 regex = ( 182 regex = (
184 (r"(It was generated by help2man) [0-9.]+", r"\g<1>."), 183 (r"(It was generated by help2man) [0-9.]+", r"\g<1>."),
185 (r"^\033\[[0-9;]*m([^\033]*)\033\[m", r"\g<1>"),
186 (r"^\.IP\n(.*:)\n", r".SS \g<1>\n"), 184 (r"^\.IP\n(.*:)\n", r".SS \g<1>\n"),
187 (r"^\.PP\nDescription", r".SH DETAILS"), 185 (r"^\.PP\nDescription", r".SH DETAILS"),
188 ) 186 )
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 @@
1# Copyright (C) 2022 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""Unittests for the update_manpages module."""
16
17from release import update_manpages
18
19
20def test_replace_regex() -> None:
21 """Check that replace_regex works."""
22 data = "\n\033[1mSummary\033[m\n"
23 assert update_manpages.replace_regex(data) == "\nSummary\n"