def _clean_up(key): if isinstance(key, int): key = _bug_sim(key) os.chdir(test_utils._test_home()) files = glob.glob('%s.*' % os.path.splitext(key)[0]) files.append(test_utils._summary_file(key)) test_utils._remove([f for f in files if not _is_java(f)])
def _clean_up(base_name): os.chdir(test_utils._test_home()) files = glob.glob('%s*.*' % os.path.splitext(base_name)[0]) files.append(test_utils._summary_file(base_name)) test_utils._remove([f for f in files if not _is_java(f)])
def test_bug_20(): _new_sim('BugParentNameTest') ref_file = test_utils._summary_file('BugParentNameTest') contents = test_utils._contents(ref_file) assert len(re.findall('Part', contents)) == 2 assert len(re.findall('Region', contents)) == 2 assert len(re.findall('Report', contents)) == 2 assert len(re.findall('Scene', contents)) == 4 assert len(re.findall('Scene', contents)) == 4 assert len(re.findall('Displayer', contents)) == 4
def test_bug_20(): _new_sim('BugParentNameTest') ref_file = test_utils._summary_file('BugParentNameTest') contents = test_utils._contents(ref_file) assert len(re.findall('Part ->', contents)) == 1 assert len(re.findall('Region ->', contents)) == 2 # Multiple words assert len(re.findall('Report ->', contents)) == 7 # found assert len(re.findall('Monitor ->', contents)) == 2 assert len(re.findall('Scene ->', contents)) == 4 assert len(re.findall('Displayer ->', contents)) == 2
def _ref_file_gci(): sim_file = test_utils.simulation(DEMO_ID) return test_utils._summary_file(sim_file)