簡體   English   中英

Python 寫入 function 檢查對其他函數的依賴性

[英]Python to write function that check dependencies on other functions

想詢問一些可用於檢查函數之間依賴關系的建議/可用庫。 Function test_isupper() 需要檢查 test_upper() 函數是否成功運行。 否則,不會運行 test_isupper()

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())

[重復]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM