Files @ f888b13c56b0
Branch filter:

Location: NPO-Accounting/import2ledger/tests/__init__.py

Brett Smith
hooks.add_entity: Better handle common name prefix parts.

Keep these with the name they're attached to, rather than breaking the name
in the middle.
1
2
3
4
5
6
7
import pathlib
import re

DATA_DIR = pathlib.Path(__file__).with_name('data')

def normalize_whitespace(s):
    return re.sub(r'(\t| {3,})', '  ', s)