def test_units(self):
     """ Capture absence of units. """
     layout = Layout()
     layout.units = None
     layout.layers.append(Layer())
     design = Design()
     design.layout = layout
     writer = Writer()
     writer.write(design)
 def wrap_tm(self):
     """ Perform meta operations, then method. """
     outfile = 'out-' + infile
     parser = Parser()
     design = parser.parse(path.join(DIR, infile))
     writer = Writer()
     writer.write(design, path.join(DIR, outfile))
     with open(path.join(DIR, outfile), 'r') as f:
         self.output = f.read()
     test_method(self)
 def test_images(self):
     """ Capture images with no data. """
     layer = Layer()
     layer.images.append(Image())
     layout = Layout()
     layout.units = 'mm'
     layout.layers.append(layer)
     design = Design()
     design.layout = layout
     writer = Writer()
     writer.write(design)
 def test_layers(self):
     """ Capture absence of layers. """
     design = Design()
     design.layout = Layout()
     writer = Writer()
     writer.write(design)
 def test_layout(self):
     """ Capture absence of a layout. """
     design = Design()
     writer = Writer()
     writer.write(design)