Unit test for type and type of contents simultaneously in Python3

后端 未结 0 858
一生所求
一生所求 2021-01-15 05:51

Let\'s say I have a function like so:

def f(x):
    return (1, 2, 3)

If I want to unit test that the return type is a tuple, I can use assert

相关标签:
回答
  • 消灭零回复
提交回复
热议问题