File: sty-add-style.feature

package info (click to toggle)
python-docx 0.8.11%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,640 kB
  • sloc: xml: 25,311; python: 21,911; makefile: 168
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   |