def test_create_tag_unchanged(self):
     attdef = Attdef()
     attrib = attdef.new_attrib(tag="UNCHANGED")
     expected = "  0\nATTRIB\n  8\n0\n 10\n0.0\n 20\n0.0\n 30\n0.0\n" \
              " 40\n1.0\n  1\nAttrib\n  2\nATTRIB\n 70\n0\n"
     self.assertEqual(dxfstr(attrib), expected)
 def test_create_with_override(self):
     attdef = Attdef(layer='test')
     attrib = attdef.new_attrib(layer='xxx', insert=(2, 2))
     expected = "  0\nATTRIB\n  8\nxxx\n 10\n2.0\n 20\n2.0\n 30\n0.0\n" \
              " 40\n1.0\n  1\nAttrib\n  2\nATTRIB\n 70\n0\n"
     self.assertEqual(dxfstr(attrib), expected)
 def test_create(self):
     attdef = Attdef(layer='test')
     attrib = attdef.new_attrib(text='newtext')
     expected = "  0\nATTRIB\n  8\ntest\n 10\n0.0\n 20\n0.0\n 30\n0.0\n" \
              " 40\n1.0\n  1\nnewtext\n  2\nATTRIB\n 70\n0\n"
     self.assertEqual(dxfstr(attrib), expected)
Esempio n. 4
0
 def test_create_tag_unchanged(self):
     attdef = Attdef()
     attrib = attdef.new_attrib(tag="UNCHANGED")
     expected = "  0\nATTRIB\n  8\n0\n 10\n0.0\n 20\n0.0\n 30\n0.0\n" \
              " 40\n1.0\n  1\nAttrib\n  2\nATTRIB\n 70\n0\n"
     self.assertEqual(dxfstr(attrib), expected)
Esempio n. 5
0
 def test_create_with_override(self):
     attdef = Attdef(layer='test')
     attrib = attdef.new_attrib(layer='xxx', insert=(2, 2))
     expected = "  0\nATTRIB\n  8\nxxx\n 10\n2.0\n 20\n2.0\n 30\n0.0\n" \
              " 40\n1.0\n  1\nAttrib\n  2\nATTRIB\n 70\n0\n"
     self.assertEqual(dxfstr(attrib), expected)
Esempio n. 6
0
 def test_create(self):
     attdef = Attdef(layer='test')
     attrib = attdef.new_attrib(text='newtext')
     expected = "  0\nATTRIB\n  8\ntest\n 10\n0.0\n 20\n0.0\n 30\n0.0\n" \
              " 40\n1.0\n  1\nnewtext\n  2\nATTRIB\n 70\n0\n"
     self.assertEqual(dxfstr(attrib), expected)