Exemple #1
0
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)
Exemple #2
0
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
Exemple #3
0
def test_generate_missing_input(tmpdir):
    p = utils.create_project(tmpdir, 'p', 2, 2)

    with pytest.raises(ValueError):
        generate_layout(p)
Exemple #4
0
 def generate(self, project_name, force=False):
     project = Project(os.path.join(self._root, project_name))
     generate_layout(project, force)