-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathpp_custom_pformat.txt
51 lines (47 loc) · 2.06 KB
/
pp_custom_pformat.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Test with custom pformat
12:34:56.78 LOG:
12:34:56.78 .... x = custom(1)
12:34:56.78 LOG:
12:34:56.78 .... pp(x) + y = custom(3)
12:34:56.78 LOG:
12:34:56.78 ............ x = 1
12:34:56.78 ............ y = 2
12:34:56.78 ........ x + y = 3
12:34:56.78 ........ y = 2
12:34:56.78 .... (x + y) + y = custom(5)
12:34:56.78 >>> Enter with block in test_misc in File "/path/to_file.py", line 11
12:34:56.78 .......... x = 1
12:34:56.78 .......... y = 2
12:34:56.78 12 | y = 3 # custom pformat is not used here
12:34:56.78 .............. y = 3
12:34:56.78 <<< Exit with block in test_misc
12:34:56.78 LOG:
12:34:56.78 .... d = custom(['a long key to be pretty printed prettily', ['prettyprinter prints datetime with keyword arguments:', datetime.datetime(1970, 1, 1, 0, 0, 42)]])
Test without prettyprinter and without pprintpp
12:34:56.78 LOG:
12:34:56.78 .... d = ['a long key to be pretty printed prettily',
12:34:56.78 ['prettyprinter prints datetime with keyword arguments:',
12:34:56.78 datetime.datetime(1970, 1, 1, 0, 0, 42)]]
Test with prettyprinter and without pprintpp
12:34:56.78 LOG:
12:34:56.78 .... d = ['a long key to be pretty printed prettily',
12:34:56.78 ['prettyprinter prints datetime with keyword arguments:',
12:34:56.78 datetime.datetime(1970, 1, 1, 0, 0, 42)]]
Test without prettyprinter and with pprintpp
12:34:56.78 LOG:
12:34:56.78 .... d = [
12:34:56.78 'a long key to be pretty printed prettily',
12:34:56.78 [
12:34:56.78 'prettyprinter prints datetime with keyword arguments:',
12:34:56.78 datetime.datetime(1970, 1, 1, 0, 0, 42),
12:34:56.78 ],
12:34:56.78 ]
Test with prettyprinter and with pprintpp
12:34:56.78 LOG:
12:34:56.78 .... d = [
12:34:56.78 'a long key to be pretty printed prettily',
12:34:56.78 [
12:34:56.78 'prettyprinter prints datetime with keyword arguments:',
12:34:56.78 datetime.datetime(1970, 1, 1, 0, 0, 42),
12:34:56.78 ],
12:34:56.78 ]