FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Don't define class-scoped fixtures as instance methods by cjwatson · Pull Request #1563 · python-openxml/python-docx · GitHub

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 4 additions & 2 deletions tests/opc/test_phys_pkg.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def pkg_file_(self, request):
return loose_mock(request)

@pytest.fixture(scope="class")
def dir_reader(self):
@classmethod
def dir_reader(cls):
return _DirPkgReader(dir_pkg_path)


Expand Down Expand Up @@ -115,7 +116,8 @@ def it_returns_none_when_part_has_no_rels_xml(self, phys_reader):
# fixtures ---------------------------------------------

@pytest.fixture(scope="class")
def phys_reader(self):
@classmethod
def phys_reader(cls):
phys_reader = _ZipPkgReader(zip_pkg_path)
yield phys_reader
phys_reader.close()
Expand Down

Back | FazBrowse Home | New Git URL