未验证 提交 dd417750 编写于 作者: Y Yanghello 提交者: GitHub

fix crypto ut test error for windows ci (#29090)

上级 7b6dbd83
......@@ -22,9 +22,9 @@ import unittest
class CipherUtilsTestCase(unittest.TestCase):
def test_gen_key(self):
key1 = CipherUtils.gen_key(256)
key2 = CipherUtils.gen_key_to_file(256, "/tmp/paddle_aes_test.keyfile")
key2 = CipherUtils.gen_key_to_file(256, "paddle_aes_test.keyfile")
self.assertNotEquals(key1, key2)
key3 = CipherUtils.read_key_from_file("/tmp/paddle_aes_test.keyfile")
key3 = CipherUtils.read_key_from_file("paddle_aes_test.keyfile")
self.assertEqual(key2, key3)
self.assertEqual(len(key1), 32)
self.assertEqual(len(key2), 32)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册