Coverage for tests/test_ellipsis.py: 67%

10 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2023-02-02 14:10 +0000

1# This file is part of utils. 

2# 

3# Developed for the LSST Data Management System. 

4# This product includes software developed by the LSST Project 

5# (https://www.lsst.org). 

6# See the COPYRIGHT file at the top-level directory of this distribution 

7# for details of code ownership. 

8# 

9# Use of this source code is governed by a 3-clause BSD-style 

10# license that can be found in the LICENSE file. 

11 

12import unittest 

13 

14import lsst.utils 

15import lsst.utils.tests 

16from lsst.utils.ellipsis import Ellipsis, EllipsisType 

17 

18 

19class EllipsisTestCase(lsst.utils.tests.TestCase): 

20 def test_ellipsis(self): 

21 # These are true at runtime because of typing.TYPE_CHECKING guards in 

22 # the module. When MyPy or other type-checkers run, these assertions 

23 # would not be true, and `Ellipsis` must be used instead of the literal 

24 # `...` to be understood by mypy. 

25 self.assertIs(Ellipsis, ...) 

26 self.assertIs(EllipsisType, type(...)) 

27 

28 

29if __name__ == "__main__": 29 ↛ 30line 29 didn't jump to line 30, because the condition on line 29 was never true

30 unittest.main()