mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Add two methods to test module
This commit is contained in:
parent
fcd0ffadde
commit
e0bda82a13
|
@ -18,3 +18,27 @@ class Foo:
|
|||
|
||||
self.spam = 4
|
||||
"""Docstring for instance attribute spam."""
|
||||
|
||||
def add(self, val1, val2):
|
||||
"""Return the added values.
|
||||
|
||||
:param val1: First number to add.
|
||||
:type val1: int
|
||||
:param val2: Second number to add.
|
||||
:type val2: int
|
||||
:rtype: int
|
||||
|
||||
"""
|
||||
|
||||
return val1 + val2
|
||||
|
||||
def capitalize(self, myvalue):
|
||||
"""Return a string as uppercase.
|
||||
|
||||
:param myvalue: String to change
|
||||
:type myvalue: string
|
||||
:rtype: string
|
||||
|
||||
"""
|
||||
|
||||
return myvalue.upper()
|
||||
|
|
Loading…
Reference in New Issue
Block a user