#!/usr/bin/env python # This is a standalone test for the regex inside validate-modules # It is not suitable to add to the make tests target because the # file under test is outside the test's sys.path AND has a hyphen # in the name making it unimportable. # # To execute this by hand: # 1) cd # 2) source hacking/env-setup # 3) PYTHONPATH=./lib nosetests -d -w test -v --nocapture sanity/validate-modules import re from ansible.compat.tests import unittest # TYPE_REGEX = re.compile(r'.*\stype\(.*') # TYPE_REGEX = re.compile(r'.*(if|or)\stype\(.*') # TYPE_REGEX = re.compile(r'.*(if|or)(\s+.*|\s+)type\(.*') # TYPE_REGEX = re.compile(r'.*(if|or)(\s+.*|\s+)type\(.*') # TYPE_REGEX = re.compile(r'.*(if|\sor)(\s+.*|\s+)type\(.*') # TYPE_REGEX = re.compile(r'.*(if|\sor)(\s+.*|\s+)(?