简体   繁体   English

Python 写入 function 检查对其他函数的依赖性

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

Would like to ask for some advice/ available libraries that can be use to check dependencies between functions.想询问一些可用于检查函数之间依赖关系的建议/可用库。 Function test_isupper() will need to check if test_upper()function is successfully run. Function test_isupper() 需要检查 test_upper() 函数是否成功运行。 Else, not going to run test_isupper()否则,不会运行 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())

[repeated] [重复]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 其他函数中的 Python 布尔检查 - Python boolean check in other functions 我可以在多行的python中编写lambda函数,然后调用其他函数吗? - Can I write a lambda function in python of more than one line, and call other functions? 如何编写自己的 python awaitable function 即不仅调用其他异步函数? - How to write your own python awaitable function that is not only calls other async functions? 使用依赖项使用 Google Cloud Functions 部署 Python 函数时出错 - Error deploying Python function using Google Cloud Functions using dependencies Python主函数从不调用其他函数? - Python main function never calls other functions? Azure 函数不执行其他 Python 函数 - Azure function does not execute other Python functions 尝试编写调用其他函数并与字符串值连接并将结果写入文件 python 的 function 时出现非类型错误 - non type error when trying to write a function that calls other functions and concatenates with string values and writes the results to a file python 从python文件中提取函数并将其写入其他文件 - Extract functions from python file and write them to other files 如何在 python 中编写两个相邻的函数? - How can I write two functions next to each other in python? 如何为Windows Box编写安装程序(安装python,python模块和其他依赖项)? - how to write installer (installing python, python modules and other dependencies) for windows boxes?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM