1 Star 0 Fork 0

邴岱一 / webapp1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test_Case1.py 539 Bytes
一键复制 编辑 原始数据 按行查看 历史
bingdiayi 提交于 2020-05-17 11:19 . add unittest login case
import unittest
class TestStringMethods(unittest.TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
def test_split(self):
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
# check that s.split fails when the separator is not a string
with self.assertRaises(TypeError):
s.split(2)
if __name__ == '__main__':
unittest.main()
Python
1
https://gitee.com/bing_daiyi/webapp1.git
git@gitee.com:bing_daiyi/webapp1.git
bing_daiyi
webapp1
webapp1
master

搜索帮助