jsoncpp/test/cleantests.py
Hans Johnson 27049797c1 ENH: Unconditionally format python files with black
pip install black
black --target-version py36 .

Black is the uncompromising Python code formatter. By using it, you
agree to cede control over minutiae of hand-formatting. In return, Black
gives you speed, determinism, and freedom from pycodestyle nagging about
formatting. You will save time and mental energy for more important
matters.

Blackened code looks the same regardless of the project you're reading.
Formatting becomes transparent after a while and you can focus on the
content instead.

Black makes code review faster by producing the smallest diffs possible.

https://github.com/python/black
2019-11-04 07:57:55 -06:00

17 lines
488 B
Python

# Copyright 2007 Baptiste Lepilleur and The JsonCpp Authors
# Distributed under MIT license, or public domain if desired and
# recognized in your jurisdiction.
# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
"""Removes all files created during testing."""
import glob
import os
paths = []
for pattern in ["*.actual", "*.actual-rewrite", "*.rewrite", "*.process-output"]:
paths += glob.glob("data/" + pattern)
for path in paths:
os.unlink(path)