Beispiel #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)
Beispiel #2
0
 def test_single(self):
     self.assertEqual(merge.merge(merge.DEFAULT_PROJECT), BASE)
Beispiel #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)
Beispiel #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
Beispiel #7
0
def fill_before(desc):
    desc = merge.merge(
        merge.DEFAULT_PROJECT, {'animation': {'typename': 'off'}}, desc)
    return project.Project.pre_recursion(desc)
Beispiel #8
0
 def test_single(self):
     self.assertEqual(merge.merge(merge.DEFAULT_PROJECT), BASE)
Beispiel #9
0
 def test_empty(self):
     self.assertEqual(merge.merge(), {})
Beispiel #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
Beispiel #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