File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ def paragraphs(self):
100100 """
101101 return self ._document_part .paragraphs
102102
103+ @property
104+ def part (self ):
105+ return self ._document .part
106+
103107 def save (self , path_or_stream ):
104108 """
105109 Save this document to *path_or_stream*, which can be either a path to
Original file line number Diff line number Diff line change 1- Feature : Get the document numbering part
2- In order to query and modify numbering settings
3- As a programmer using the advanced python-docx API
1+ Feature : Access the document numbering part
2+ In order to operate on numbering settings
3+ As a developer using python-docx
44 I need access to the numbering part of the document
55
6+
7+ @wip
68 Scenario : Get an existing numbering part from document
79 Given a document having a numbering part
810 When I get the numbering part from the document
Original file line number Diff line number Diff line change 1515
1616@given ('a document having a numbering part' )
1717def given_a_document_having_a_numbering_part (context ):
18- docx_path = test_docx ('num-having-numbering-part' )
19- context .document = Document (docx_path )
18+ context .document = Document (test_docx ('num-having-numbering-part' ))
2019
2120
2221# when ====================================================
2322
2423@when ('I get the numbering part from the document' )
2524def when_get_numbering_part_from_document (context ):
2625 document = context .document
27- context .numbering_part = document .numbering_part
26+ context .numbering_part = document .part . numbering_part
2827
2928
3029# then =====================================================
You can’t perform that action at this time.
0 commit comments