@@ -820,7 +820,7 @@ def setup(self):
820
820
self .obj = self ._getobj ()
821
821
822
822
def _prunetraceback (self , excinfo ):
823
- if hasattr (self , "_obj" ) and not self .config .option . fulltrace :
823
+ if hasattr (self , "_obj" ) and not self .config .getoption ( " fulltrace" , False ) :
824
824
code = _pytest ._code .Code (get_real_func (self .obj ))
825
825
path , firstlineno = code .path , code .firstlineno
826
826
traceback = excinfo .traceback
@@ -835,14 +835,14 @@ def _prunetraceback(self, excinfo):
835
835
excinfo .traceback = ntraceback .filter ()
836
836
# issue364: mark all but first and last frames to
837
837
# only show a single-line message for each frame
838
- if self .config .option . tbstyle == "auto" :
838
+ if self .config .getoption ( " tbstyle" , "auto" ) == "auto" :
839
839
if len (excinfo .traceback ) > 2 :
840
840
for entry in excinfo .traceback [1 :- 1 ]:
841
841
entry .set_repr_style ("short" )
842
842
843
843
def repr_failure (self , excinfo , outerr = None ):
844
844
assert outerr is None , "XXX outerr usage is deprecated"
845
- style = self .config .option . tbstyle
845
+ style = self .config .getoption ( " tbstyle" , "auto" )
846
846
if style == "auto" :
847
847
style = "long"
848
848
return self ._repr_failure_py (excinfo , style = style )
0 commit comments