File tree 1 file changed +5
-10
lines changed 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -223,8 +223,7 @@ def test_info_verbose(self):
223
223
224
224
for i , line in enumerate (lines ):
225
225
if i >= start and i < start + size :
226
- index = i - start
227
- line_nr = " {} " .format (index )
226
+ line_nr = f" { i - start } "
228
227
assert line .startswith (line_nr )
229
228
230
229
def test_info_memory (self ):
@@ -236,18 +235,16 @@ def test_info_memory(self):
236
235
bytes = float (df .memory_usage ().sum ())
237
236
238
237
expected = textwrap .dedent (
239
- """\
238
+ f """\
240
239
<class 'pandas.core.frame.DataFrame'>
241
240
RangeIndex: 2 entries, 0 to 1
242
241
Data columns (total 1 columns):
243
242
# Column Non-Null Count Dtype
244
243
--- ------ -------------- -----
245
244
0 a 2 non-null int64
246
245
dtypes: int64(1)
247
- memory usage: {} bytes
248
- """ .format (
249
- bytes
250
- )
246
+ memory usage: { bytes } bytes
247
+ """
251
248
)
252
249
253
250
assert result == expected
@@ -313,9 +310,7 @@ def test_info_shows_column_dtypes(self):
313
310
)
314
311
assert header in res
315
312
for i , dtype in enumerate (dtypes ):
316
- name = " {i:d} {i:d} {n:d} non-null {dtype}" .format (
317
- i = i , n = n , dtype = dtype
318
- )
313
+ name = f" { i :d} { i :d} { n :d} non-null { dtype } "
319
314
assert name in res
320
315
321
316
def test_info_max_cols (self ):
You can’t perform that action at this time.
0 commit comments