Rename test_against_ls to _test_against_ls so pytest doesn't try to collect it

This commit is contained in:
Andrew Hamilton 2026-07-27 11:08:27 +10:00
parent a064c1f3a6
commit 81e3780e34

View file

@ -204,7 +204,7 @@ class ParseLsLineTestCase(unittest.TestCase):
("38;5;30", "hello"))
def test_against_ls(root_path, environment):
def _test_against_ls(root_path, environment):
process = subprocess.run(["ls", "--color=always", "-R", root_path],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=environment)
color_codes = lscolors.get_color_codes(environment)
@ -234,6 +234,5 @@ RICH_COLOR_CODES = (
if __name__ == "__main__":
unittest.main()
# root_path = "/"
# test_against_ls(root_path, {"LS_COLORS": RICH_COLOR_CODES})
# test_against_ls(root_path, {}) # Test using default colors
# _test_against_ls(root_path, {"LS_COLORS": RICH_COLOR_CODES})
# _test_against_ls(root_path, {}) # Test using default colors