浏览代码

Tests: use fail rather than assertTrue(False)

Jason Rumney 3 年之前
父节点
当前提交
e2d59b9347
共有 2 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/test_device.py
  2. 0 0
      tests/test_device_config.py

+ 1 - 1
tests/test_device.py

@@ -600,7 +600,7 @@ class TestDevice(IsolatedAsyncioTestCase):
         print("getting last iteration...")
         try:
             result = await loop.__anext__()
-            self.assertTrue(False)
+            self.fail("Should have raised an exception to quit the loop")
         # Check that the loop terminated
         except StopAsyncIteration:
             pass

文件差异内容过多而无法显示
+ 0 - 0
tests/test_device_config.py


部分文件因为文件数量过多而无法显示