File: doc-add-paragraph.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 (27 lines) | stat: -rw-r--r-- 883 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
21
22
23
24
25
26
27
Feature: Add a paragraph with optional text and style
  In order to populate the text of a document
  As a developer using python-docx
  I need a way to add a styled paragraph of text in a single step


  Scenario: Add an empty paragraph
    Given a blank document
     When I add a paragraph without specifying text or style
     Then the last paragraph is the empty paragraph I added


  Scenario: Add a paragraph specifying its text
    Given a blank document
     When I add a paragraph specifying its text
     Then the last paragraph contains the text I specified


  Scenario Outline: Add a paragraph specifying its style
    Given a document
     When I add a paragraph specifying its style as a <style-spec>
     Then the last paragraph has the style I specified

    Examples: ways of specifying a style
      | style-spec   |
      | style object |
      | style name   |