def test_variants_separation(testdir): testmon1_data = CoreTestmonData(testdir.tmpdir.strpath, variant='1') testmon1_data.node_data['node1'] = {'a.py': 1} testmon1_data.write_data() testmon2_data = CoreTestmonData(testdir.tmpdir.strpath, variant='2') testmon2_data.node_data['node1'] = {'a.py': 2} testmon2_data.write_data() testmon_check_data = CoreTestmonData(testdir.tmpdir.strpath, variant='1') testmon_check_data.read_fs() assert testmon1_data.node_data['node1'] == {'a.py': 1}
def init_testmon_data(config): if not hasattr(config, 'testmon_data'): variant = eval_variant(config.getini('run_variant_expression')) config.project_dirs = config.getoption('project_directory') or [config.rootdir.strpath] testmon_data = TestmonData(config.project_dirs[0], variant=variant) affected = testmon_data.read_fs() config.testmon_data = testmon_data return affected
def init_testmon_data(config): if not hasattr(config, 'testmon_data'): variant = eval_variant(config.getini('run_variant_expression')) config.project_dirs = config.getoption('project_directory') or [ config.rootdir.strpath ] testmon_data = TestmonData(config.project_dirs[0], variant=variant) affected = testmon_data.read_fs() config.testmon_data = testmon_data return affected