'模块'对象没有属性'41531'Python Notebook Databricks错误

时间:2018-08-31 05:50:57

标签: azure python-unittest databricks

我正在尝试在Azure Databricks的Python Notebook中运行简单的单元测试。

import unittest

class KnownValues(unittest.TestCase):
known_values =  ((1, 'I'),
                 (2, 'II'),
                 (3, 'III'),
                 (4, 'IV'),
                 (5, 'V'))

def test_to_roman_values(self):
    for integer, numeral in self.known_values:
        result = roman1.to_roman(integer)
        self.assertEqual(numeral, result)

if __name__ == '__main__':
    unittest.main()

但是它在行unittest.main()上给了我错误是“模块对象没有属性” 41531“” 有什么问题吗?

0 个答案:

没有答案