Example #1
0
    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)
Example #2
0
 def test_single(self):
     self.assertEqual(merge.merge(merge.DEFAULT_PROJECT), BASE)
Example #3
0
 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)
Example #6
0
def fill_after(desc):
    desc = merge.merge(merge.DEFAULT_PROJECT, desc)
    desc['layout'] = desc['layout'] or fill.fill_layout(desc['animation'])
    return desc
Example #7
0
def fill_before(desc):
    desc = merge.merge(
        merge.DEFAULT_PROJECT, {'animation': {'typename': 'off'}}, desc)
    return project.Project.pre_recursion(desc)
Example #8
0
 def test_single(self):
     self.assertEqual(merge.merge(merge.DEFAULT_PROJECT), BASE)
Example #9
0
 def test_empty(self):
     self.assertEqual(merge.merge(), {})
Example #10
0
def cleanup_after(desc):
    desc = merge.merge(merge.DEFAULT_PROJECT, desc)
    desc['layout'] = desc['layout'] or cleanup.cleanup_layout(desc['animation'])
    return desc
Example #11
0
def fill_after(desc):
    desc = merge.merge(merge.DEFAULT_PROJECT, desc)
    desc['layout'] = desc['layout'] or fill.fill_layout(desc['animation'])
    return desc