Did I find the right examples for you? yes no

All Samples(120)  |  Call(111)  |  Derive(0)  |  Import(9)

src/p/y/python-pptx-HEAD/tests/test_text.py   python-pptx(Download)
    an_hlinkClick, an_r, an_rPr, an_spAutoFit
)
from .unitutil import (
    absjoin, actual_xml, class_mock, instance_mock, loose_mock,
    parse_xml_file, property_mock, test_file_dir
    def it_can_change_its_autosize_setting(self, autosize_set_fixture):
        textframe, value, expected_xml = autosize_set_fixture
        textframe.auto_size = value
        assert actual_xml(textframe._txBody) == expected_xml
 
    def it_can_add_a_paragraph_to_the_text_it_contains(
            self, txBody, txBody_with_2_paras_xml):
        textframe = TextFrame(txBody, None)
        textframe.add_paragraph()
        assert actual_xml(textframe._txBody) == txBody_with_2_paras_xml
    def it_can_replace_the_text_it_contains(
            self, txBody, txBody_with_text_xml):
        textframe = TextFrame(txBody, None)
        textframe.text = 'foobar'
        assert actual_xml(txBody) == txBody_with_text_xml
        textframe = TextFrame(txBody_bldr.element, None)
        textframe.margin_left = Inches(0.01)
        assert actual_xml(textframe._txBody) == txBody_with_lIns_xml
 
        textframe = TextFrame(txBody_bldr.element, None)

src/p/y/python-pptx-0.4.2/tests/test_text.py   python-pptx(Download)
    an_hlinkClick, an_r, an_rPr, an_spAutoFit
)
from .unitutil import (
    absjoin, actual_xml, class_mock, instance_mock, loose_mock,
    parse_xml_file, property_mock, test_file_dir
    def it_can_change_its_autosize_setting(self, autosize_set_fixture):
        textframe, value, expected_xml = autosize_set_fixture
        textframe.auto_size = value
        assert actual_xml(textframe._txBody) == expected_xml
 
    def it_can_add_a_paragraph_to_the_text_it_contains(
            self, txBody, txBody_with_2_paras_xml):
        textframe = TextFrame(txBody, None)
        textframe.add_paragraph()
        assert actual_xml(textframe._txBody) == txBody_with_2_paras_xml
    def it_can_replace_the_text_it_contains(
            self, txBody, txBody_with_text_xml):
        textframe = TextFrame(txBody, None)
        textframe.text = 'foobar'
        assert actual_xml(txBody) == txBody_with_text_xml
        textframe = TextFrame(txBody_bldr.element, None)
        textframe.margin_left = Inches(0.01)
        assert actual_xml(textframe._txBody) == txBody_with_lIns_xml
 
        textframe = TextFrame(txBody_bldr.element, None)

src/p/y/python-pptx-HEAD/tests/oxml/test_text.py   python-pptx(Download)
    an_r, an_rPr
)
from ..unitutil import actual_xml
 
 
    def it_adds_rPr_element_in_proper_sequence_if_r_doesnt_have_one(
            self, r, r_with_rPr_xml):
        r.get_or_add_rPr()
        assert actual_xml(r) == r_with_rPr_xml
 
    def it_can_set_its_lIns_attribute(
            self, bodyPr, bodyPr_xml, bodyPr_with_lIns_xml,
            bodyPr_with_tIns_xml, bodyPr_with_rIns_xml,
            bodyPr_with_bIns_xml):
        assert actual_xml(bodyPr) == bodyPr_xml
 
        bodyPr.lIns = 987
        assert actual_xml(bodyPr) == bodyPr_with_lIns_xml
        bodyPr.lIns = None
        assert actual_xml(bodyPr) == bodyPr_xml

src/p/y/python-pptx-HEAD/tests/oxml/test_dml.py   python-pptx(Download)
    a_lumMod, a_lumOff, a_prstClr, a_schemeClr, a_solidFill, an_srgbClr
)
from ..unitutil import actual_xml
 
 
        schemeClr_with_lumMod.clear_lum()
        schemeClr_with_lumOff.clear_lum()
        assert actual_xml(schemeClr_with_lumMod) == schemeClr_xml
        assert actual_xml(schemeClr_with_lumOff) == schemeClr_xml
 
    def it_can_add_a_lumMod_child_element(
            self, schemeClr, schemeClr_with_lumMod_xml):
        lumMod = schemeClr.add_lumMod(75000)
        assert actual_xml(schemeClr) == schemeClr_with_lumMod_xml
    def it_can_add_a_lumOff_child_element(
            self, schemeClr, schemeClr_with_lumOff_xml):
        lumOff = schemeClr.add_lumOff(40000)
        assert actual_xml(schemeClr) == schemeClr_with_lumOff_xml
        assert schemeClr.find(qn('a:lumOff')) == lumOff

src/p/y/python-pptx-HEAD/tests/oxml/test_presentation.py   python-pptx(Download)
    a_notesSz, a_presentation, a_sldId, a_sldIdLst, a_sldSz
)
from ..unitutil import actual_xml
 
 
    def it_can_add_a_sldIdLst_child_element(
            self, prs_with_sldSz, prs_with_sldIdLst_sldSz_xml):
        prs = prs_with_sldSz
        prs.get_or_add_sldIdLst()
        assert actual_xml(prs) == prs_with_sldIdLst_sldSz_xml
    def it_adds_sldIdLst_before_notesSz_if_no_sldSz_elm(
            self, prs_with_notesSz, prs_with_sldIdLst_notesSz_xml):
        prs = prs_with_notesSz
        prs.get_or_add_sldIdLst()
        assert actual_xml(prs) == prs_with_sldIdLst_notesSz_xml
    def it_provides_indexed_access_to_the_sldIds(self, sldIdLst_with_sldIds):
        sldIdLst, sldId_xml, sldId_2_xml = sldIdLst_with_sldIds
        assert actual_xml(sldIdLst[0]) == sldId_xml
        assert actual_xml(sldIdLst[1]) == sldId_2_xml
 

src/p/y/python-pptx-HEAD/tests/shapes/test_table.py   python-pptx(Download)
from ..oxml.unitdata.table import a_tc, a_tcPr, a_txBody
from ..oxml.unitdata.text import a_bodyPr, a_p, an_r, a_t
from ..unitutil import actual_xml, TestCase
 
 
        cell.margin_top = marT
        cell.margin_bottom = marB
        assert actual_xml(cell._tc) == tc_with_marX_xml
 
    def it_raises_on_margin_assigned_other_than_int_or_None(
    def it_can_set_the_text_it_contains(self, text_set_fixture):
        cell, text, tc_with_text_xml = text_set_fixture
        cell.text = text
        assert actual_xml(cell._tc) == tc_with_text_xml
 
    def it_can_change_its_vertical_anchor(self, anchor_set_fixture):
        cell, vertical_anchor, tc_with_anchor_xml = anchor_set_fixture
        cell.vertical_anchor = vertical_anchor
        assert actual_xml(cell._tc) == tc_with_anchor_xml
 

src/p/y/python-pptx-HEAD/tests/dml/test_color.py   python-pptx(Download)
    an_hslClr, an_scrgbClr, an_srgbClr
)
from ..unitutil import actual_xml
 
 
    def it_can_set_itself_to_an_RGB_color(self, set_rgb_fixture_):
        color_format, rgb_color, expected_xml = set_rgb_fixture_
        color_format.rgb = rgb_color
        assert actual_xml(color_format._xFill) == expected_xml
 
    def it_can_set_itself_to_a_theme_color(self, set_theme_color_fixture_):
        color_format, theme_color, expected_xml = set_theme_color_fixture_
        color_format.theme_color = theme_color
        assert actual_xml(color_format._xFill) == expected_xml
 
    def it_can_set_its_brightness_adjustment(self, set_brightness_fixture_):
        color_format, brightness, expected_xml = set_brightness_fixture_
        color_format.brightness = brightness
        assert actual_xml(color_format._xFill) == expected_xml

src/p/y/python-pptx-HEAD/tests/dml/test_fill.py   python-pptx(Download)
from ..oxml.unitdata.table import a_tcPr
from ..oxml.unitdata.text import an_rPr
from ..unitutil import actual_xml
 
 
    def it_can_set_the_fill_type_to_no_fill(self, set_noFill_fixture_):
        fill_format, xPr_with_noFill_xml = set_noFill_fixture_
        fill_format.background()
        assert actual_xml(fill_format._xPr) == xPr_with_noFill_xml
 
    def it_can_set_the_fill_type_to_solid(self, set_solid_fixture_):
        fill_format, xPr_with_solidFill_xml = set_solid_fixture_
        fill_format.solid()
        assert actual_xml(fill_format._xPr) == xPr_with_solidFill_xml

src/p/y/python-pptx-HEAD/tests/oxml/shapes/test_autoshape.py   python-pptx(Download)
    a_gd, a_prstGeom, an_avLst, an_spPr, test_shape_elements
)
from ...unitutil import actual_xml, TestCase
 
 
    def it_can_rewrite_the_gd_elms(self, rewrite_guides_fixture_):
        prstGeom, guides, expected_xml = rewrite_guides_fixture_
        prstGeom.rewrite_guides(guides)
        assert actual_xml(prstGeom) == expected_xml