@@ -19,7 +19,7 @@ def test_default_traceback(self):
19
19
]
20
20
self .assertIn ("Traceback (most recent call last)" , result )
21
21
self .assertIn ("Exception: This is a test exception" , result )
22
- if rich_installed :
22
+ if self . rich_installed :
23
23
self .assertIn ("────────" , result )
24
24
# locals should not be present
25
25
self .assertNotIn ("name = 'me'" , result )
@@ -54,7 +54,7 @@ def test_tb_command_overrides(self):
54
54
)[1 ]
55
55
self .assertIn ("Traceback (most recent call last)" , result )
56
56
self .assertIn ("Exception: This is a test exception" , result )
57
- if rich_installed :
57
+ if self . rich_installed :
58
58
self .assertIn ("────────" , result )
59
59
# locals should be present
60
60
self .assertIn ("name = 'me'" , result )
@@ -114,7 +114,7 @@ def test_traceback_set_to_false(self):
114
114
@override_settings (DT_RICH_TRACEBACK_CONFIG = True )
115
115
def test_traceback_set_to_true (self ):
116
116
self .assertEqual (traceback_config (), {"show_locals" : False })
117
- self .assertIs (use_rich_tracebacks (), rich_installed )
117
+ self .assertIs (use_rich_tracebacks (), self . rich_installed )
118
118
119
119
@override_settings (DT_RICH_TRACEBACK_CONFIG = None )
120
120
def test_traceback_set_to_none (self ):
@@ -156,7 +156,7 @@ def test_traceback_no_locals_short_false(self):
156
156
)[1 ]
157
157
self .assertIn ("Traceback (most recent call last)" , result )
158
158
self .assertIn ("Exception: This is a test exception" , result )
159
- if rich_installed :
159
+ if self . rich_installed :
160
160
self .assertIn ("────────" , result )
161
161
self .assertGreater (len (re .findall (r"\.py:\d+" , result ) or []), 0 )
162
162
@@ -199,7 +199,7 @@ def test_colored_traceback(self):
199
199
result = run_command (
200
200
"test_command1" , "--force-color" , "delete" , "Brian" , "--throw"
201
201
)[1 ]
202
- if rich_installed :
202
+ if self . rich_installed :
203
203
self .assertIn ("\x1b " , result )
204
204
205
205
result = run_command (
0 commit comments