File: run-char-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 (29 lines) | stat: -rw-r--r-- 1,173 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
28
29
Feature: Each run has a read/write style
  In order to use the stylesheet capability built into Word
  As a developer using python-docx
  I need the ability to get and set the character style of a run


  Scenario Outline: Get the character style of a run
    Given a run having <style> style
     Then run.style is styles['<value>']

    Examples: Character styles
      | style       | value                  |
      | no explicit | Default Paragraph Font |
      | Emphasis    | Emphasis               |
      | Strong      | Strong                 |


  Scenario Outline: Set the style of a run
    Given a run having <style> style
     When I assign <value> to run.style
     Then run.style is styles['<style-name>']

    Examples: Character style transitions
      | style       | value              | style-name             |
      | no explicit | Emphasis           | Emphasis               |
      | no explicit | styles['Emphasis'] | Emphasis               |
      | Emphasis    | Strong             | Strong                 |
      | Emphasis    | styles['Strong']   | Strong                 |
      | Strong      | None               | Default Paragraph Font |