mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-15 17:52:24 +01:00
Update battest.py
Add decorator test `@classmethod` and fixed spellings.
This commit is contained in:
19
tests/syntax-tests/highlighted/Python/battest.py
vendored
19
tests/syntax-tests/highlighted/Python/battest.py
vendored
@@ -8,7 +8,7 @@
|
||||
[38;2;248;248;242mh2[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;190;132;255m4[0m[38;2;248;248;242m [0m[38;2;117;113;94m#[0m[38;2;117;113;94m this is a comment[0m
|
||||
[38;2;117;113;94m"""[0m[38;2;117;113;94mthis is also a comment[0m[38;2;117;113;94m"""[0m
|
||||
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m Import testt[0m
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m Import test[0m
|
||||
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m class test[0m
|
||||
|
||||
@@ -16,14 +16,19 @@
|
||||
[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mHello[0m[38;2;248;248;242m:[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mdef[0m[38;2;248;248;242m [0m[38;2;102;217;239m__init__[0m[38;2;248;248;242m([0m[3;38;2;253;151;31mself[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mx[0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255mself[0m[38;2;248;248;242m.[0m[38;2;248;248;242mname[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;248;248;242mx[0m
|
||||
|
||||
[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mdef[0m[38;2;248;248;242m [0m[38;2;166;226;46mselfprint[0m[38;2;248;248;242m([0m[3;38;2;253;151;31mself[0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m
|
||||
[38;2;248;248;242m [0m[38;2;102;217;239mprint[0m[38;2;248;248;242m([0m[38;2;230;219;116m"[0m[38;2;230;219;116mhello my name is [0m[38;2;230;219;116m"[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;255;255;255mself[0m[38;2;248;248;242m.[0m[38;2;248;248;242mname[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mdef[0m[38;2;248;248;242m [0m[38;2;166;226;46mtestprint[0m[38;2;248;248;242m([0m[3;38;2;253;151;31mself[0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m
|
||||
[38;2;248;248;242m [0m[38;2;102;217;239mprint[0m[38;2;248;248;242m([0m[38;2;190;132;255m1[0m[38;2;249;38;114m*[0m[38;2;190;132;255m2[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m2[0m[38;2;249;38;114m+[0m[38;2;190;132;255m3[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m4[0m[38;2;248;248;242m [0m[38;2;249;38;114m%[0m[38;2;248;248;242m [0m[38;2;190;132;255m5[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m8[0m[38;2;249;38;114m-[0m[38;2;190;132;255m4[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m9[0m[38;2;249;38;114m/[0m[38;2;190;132;255m4[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m23[0m[38;2;249;38;114m/[0m[38;2;249;38;114m/[0m[38;2;190;132;255m4[0m[38;2;248;248;242m)[0m
|
||||
|
||||
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m Decorators test[0m
|
||||
[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mDecorators[0m[38;2;248;248;242m:[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m@[0m[38;2;102;217;239mclassmethod[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mdef[0m[38;2;248;248;242m [0m[38;2;166;226;46mdecoratorsTest[0m[38;2;248;248;242m([0m[3;38;2;253;151;31mself[0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mpass[0m
|
||||
[38;2;248;248;242m [0m
|
||||
[38;2;248;248;242mH1[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;248;248;242mHello[0m[38;2;248;248;242m([0m[38;2;230;219;116m"[0m[38;2;230;219;116mjohn[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242mH1[0m[38;2;248;248;242m.[0m[38;2;248;248;242mselfprint[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242mH1[0m[38;2;248;248;242m.[0m[38;2;248;248;242mtestprint[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m
|
||||
@@ -37,8 +42,8 @@
|
||||
[38;2;102;217;239mprint[0m[38;2;248;248;242m([0m[38;2;248;248;242ma[0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m
|
||||
[38;2;102;217;239mprint[0m[38;2;248;248;242m([0m[38;2;248;248;242ma[0m[38;2;248;248;242m[[0m[38;2;190;132;255m2[0m[38;2;248;248;242m:[0m[38;2;248;248;242m][0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m dictioary test[0m
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m copied from w3school example[0m
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m dictionary test[0m
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m copied from w3schools example[0m
|
||||
|
||||
[38;2;248;248;242mmyfamily[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mchild1[0m[38;2;230;219;116m"[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
@@ -55,7 +60,7 @@
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m}[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m touple test[0m
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m tuple test[0m
|
||||
|
||||
[38;2;248;248;242mtestTuple[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;248;248;242m([0m[38;2;230;219;116m"[0m[38;2;230;219;116mone[0m[38;2;230;219;116m"[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m2[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m3[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m
|
||||
[38;2;102;217;239mprint[0m[38;2;248;248;242m([0m[38;2;248;248;242mtestTuple[0m[38;2;248;248;242m)[0m
|
||||
@@ -70,7 +75,7 @@
|
||||
|
||||
[38;2;248;248;242mformattest[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mteststring is =[0m[38;2;190;132;255m{[0m[38;2;190;132;255m}[0m[38;2;230;219;116m"[0m[38;2;248;248;242m.[0m[38;2;248;248;242mformat[0m[38;2;248;248;242m([0m[38;2;190;132;255m5[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m lamda test[0m
|
||||
[38;2;117;113;94m#[0m[38;2;117;113;94m lambda test[0m
|
||||
|
||||
|
||||
[38;2;249;38;114mdef[0m[38;2;248;248;242m [0m[38;2;166;226;46mx2[0m[38;2;248;248;242m([0m[3;38;2;253;151;31mn[0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m
|
||||
|
Reference in New Issue
Block a user