def test_generate_exists_noforce(tmpdir): p = utils.create_project(tmpdir, 'p', 2, 2) utils.copy_input('generate.png', p.quantized_path) generate_layout(p) with pytest.raises(ValueError): generate_layout(p)
def test_generate_transparency(tmpdir): baseline_path = utils.get_baseline_path('generate.txt') p = utils.create_project(tmpdir, 'p', 2, 2) utils.copy_input('generate.png', p.quantized_path) generate_layout(p) assert filecmp.cmp(baseline_path, p.layout_path) is True
def test_generate_missing_input(tmpdir): p = utils.create_project(tmpdir, 'p', 2, 2) with pytest.raises(ValueError): generate_layout(p)
def generate(self, project_name, force=False): project = Project(os.path.join(self._root, project_name)) generate_layout(project, force)