on master help sign in
Update battest.py

Add decorator test `@classmethod` and fixed spellings.

commitf464b1ba398b05301db39f7b91157da0afe64deb authorSarvesh MD <76893756+SarveshMD@users.noreply.github.com> dateSun 25 Jul 2021, 18:41 (5 years ago) parent2ea6348
2 files changed+24−14
tests/syntax-tests/highlighted/Python/battest.py+12−7 tests/syntax-tests/source/Python/battest.py+12−7
tests/syntax-tests/highlighted/Python/battest.py+12−7
@@ -8,7 +8,7 @@
88h2 = 4 # this is a comment
99"""this is also a comment"""
1010
11−# Import testt
11+# Import test
1212
1313# class test
1414
@@ -16,14 +16,19 @@
1616class Hello:
1717 def __init__(self, x):
1818 self.name = x
19−
19+ 
2020 def selfprint(self):
2121 print("hello my name is ", self.name)
2222
2323 def testprint(self):
2424 print(1*2, 2+3, 4 % 5, 8-4, 9/4, 23//4)
2525
26−
26+# Decorators test
27+class Decorators:
28+ @classmethod
29+ def decoratorsTest(self):
30+ pass
31+ 
2732H1 = Hello("john")
2833H1.selfprint()
2934H1.testprint()
@@ -37,8 +42,8 @@
3742print(a[2])
3843print(a[2:])
3944
40−# dictioary test
41−# copied from w3school example
45+# dictionary test
46+# copied from w3schools example
4247
4348myfamily = {
4449 "child1": {
@@ -55,7 +60,7 @@
5560 }
5661}
5762
58−# touple test
63+# tuple test
5964
6065testTuple = ("one", 2, "3")
6166print(testTuple)
@@ -70,7 +75,7 @@
7075
7176formattest = "teststring is ={}".format(5)
7277
73−# lamda test
78+# lambda test
7479
7580
7681def x2(n):
tests/syntax-tests/source/Python/battest.py+12−7
@@ -8,7 +8,7 @@ from time import *
88h2 = 4 # this is a comment
99"""this is also a comment"""
1010
11−# Import testt
11+# Import test
1212
1313# class test
1414
@@ -16,14 +16,19 @@ h2 = 4 # this is a comment
1616class Hello:
1717 def __init__(self, x):
1818 self.name = x
19−
19+
2020 def selfprint(self):
2121 print("hello my name is ", self.name)
2222
2323 def testprint(self):
2424 print(1*2, 2+3, 4 % 5, 8-4, 9/4, 23//4)
2525
26−
26+# Decorators test
27+class Decorators:
28+ @classmethod
29+ def decoratorsTest(self):
30+ pass
31+
2732H1 = Hello("john")
2833H1.selfprint()
2934H1.testprint()
@@ -37,8 +42,8 @@ print(a[:4])
3742print(a[2])
3843print(a[2:])
3944
40−# dictioary test
41−# copied from w3school example
45+# dictionary test
46+# copied from w3schools example
4247
4348myfamily = {
4449 "child1": {
@@ -55,7 +60,7 @@ myfamily = {
5560 }
5661}
5762
58−# touple test
63+# tuple test
5964
6065testTuple = ("one", 2, "3")
6166print(testTuple)
@@ -70,7 +75,7 @@ bye"""
7075
7176formattest = "teststring is ={}".format(5)
7277
73−# lamda test
78+# lambda test
7479
7580
7681def x2(n):