def test_more(self): result = merge.merge( merge.DEFAULT_PROJECT, { 'animation': 'foo', 'driver': 'bar', 'drivers': ['bang', 'bop'], }, { 'animation': 'bfoo', 'maker': {'numpy_dtype': 'float'}, 'path': 'path/to/dir' }) expected = { 'aliases': {}, 'animation': {'typename': 'bfoo'}, 'controls': [], 'shape': (), 'driver': {'typename': 'bar'}, 'drivers': ['bang', 'bop'], 'layout': {}, 'numbers': 'python', 'maker': { 'numpy_dtype': 'float', 'typename': 'bibliopixel.project.data_maker.Maker' }, 'path': 'path/to/dir', 'run': {}, 'typename': 'bibliopixel.project.project.Project' } self.assertEqual(result, expected)
def test_single(self): self.assertEqual(merge.merge(merge.DEFAULT_PROJECT), BASE)
def test_empty(self): self.assertEqual(merge.merge(), {})
def cleanup_after(desc): desc = merge.merge(merge.DEFAULT_PROJECT, desc) desc['layout'] = desc['layout'] or cleanup.cleanup_layout( desc['animation']) return desc
def cleanup_before(desc): desc = merge.merge(merge.DEFAULT_PROJECT, {'animation': { 'typename': 'off' }}, desc) return project.Project.pre_recursion(desc)
def fill_after(desc): desc = merge.merge(merge.DEFAULT_PROJECT, desc) desc['layout'] = desc['layout'] or fill.fill_layout(desc['animation']) return desc
def fill_before(desc): desc = merge.merge( merge.DEFAULT_PROJECT, {'animation': {'typename': 'off'}}, desc) return project.Project.pre_recursion(desc)
def test_single(self): self.assertEqual(merge.merge(merge.DEFAULT_PROJECT), BASE)
def test_empty(self): self.assertEqual(merge.merge(), {})
def cleanup_after(desc): desc = merge.merge(merge.DEFAULT_PROJECT, desc) desc['layout'] = desc['layout'] or cleanup.cleanup_layout(desc['animation']) return desc
def fill_after(desc): desc = merge.merge(merge.DEFAULT_PROJECT, desc) desc['layout'] = desc['layout'] or fill.fill_layout(desc['animation']) return desc