本文整理汇总了Python中HW1.shout方法的典型用法代码示例。如果您正苦于以下问题:Python HW1.shout方法的具体用法?Python HW1.shout怎么用?Python HW1.shout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HW1
的用法示例。
在下文中一共展示了HW1.shout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_shoutone
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shoutone(self):
self.assertEqual(HW1.shout("Hello"), "HELLO!") # One word
示例2: test_shouttwo
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shouttwo(self):
self.assertEqual(HW1.shout("Hello again"), "HELLO AGAIN!") # Sentence
示例3: test_shout1
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shout1(self):
self.assertEqual(HW1.shout("Hey there"), "HEY THERE!")
示例4: test_shout4
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shout4(self):
self.assertEqual(HW1.shout("Hey. You!"), "HEY! YOU!")
示例5: test_shout3
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shout3(self):
self.assertEqual(HW1.shout("Blah!"), "BLAH!")
示例6: test_shout_question
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shout_question(self):
self.assertEqual(HW1.shout("Hello world?"), "HELLO WORLD!")
示例7: stest_shoutfive
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def stest_shoutfive(self):
self.assertEqual(
HW1.shout("Multiple periods..."), "MULTIPLE PERIODS!!!"
) # turn punctuation into exclaimation =
示例8: test_one
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_one(self):
self.assertEqual(HW1.shout("hey you"), "HEY YOU!")
示例9: test_ShoutNostr
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_ShoutNostr(self):
self.assertEqual(HW1.shout(1), "")
示例10: test_ShoutPunct
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_ShoutPunct(self):
self.assertEqual(HW1.shout("Something wrong? Yes. No! Maybe"), "SOMETHING WRONG! YES! NO! MAYBE!")
示例11: test_ShoutCapital
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_ShoutCapital(self):
self.assertEqual(HW1.shout("Something wrong"), "SOMETHING WRONG!")
示例12: test_shout5
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shout5(self):
self.assertEqual(HW1.shout("99 bottles of beer!"), "99 BOTTLES OF BEER!!")
示例13: test_shoutthree
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shoutthree(self):
self.assertEqual(HW1.shout("Exclaimed Hello!!!"), "EXCLAIMED HELLO!!!!") # Punctuation
示例14: test_shoutfour
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shoutfour(self):
self.assertEqual(HW1.shout("CAPS?"), "CAPS!!") # Already in caps, add a different punctuation
示例15: test_shout_word
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import shout [as 别名]
def test_shout_word(self):
self.assertEqual(HW1.shout("word"), "WORD!")