File: sty-add-style.feature

package info (click to toggle)
python-docx 1.2.0%2Bdfsg-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,216 kB
  • sloc: xml: 25,323; python: 23,414; makefile: 175
file content (20 lines) | stat: -rw-r--r-- 767 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Feature: Add a style
  In order to customize the available styles in a document
  As a developer using python-docx
  I need a way to add a new style


  Scenario Outline: Add a style
    Given a document having known styles
     When I call add_style('<name>', <type>, builtin=<builtin>)
     Then the document has one additional style
      And styles['<name>'] is a style
      And style.type is <type>
      And style.builtin is <builtin>

    Examples: New style varieties
      | name        | type                    | builtin |
      | Heading 1   | WD_STYLE_TYPE.PARAGRAPH | True    |
      | Inline Code | WD_STYLE_TYPE.CHARACTER | False   |
      | List Bullet | WD_STYLE_TYPE.LIST      | True    |
      | Shipments   | WD_STYLE_TYPE.TABLE     | False   |