Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

import sys 

import unittest 

import inspect 

 

import lsst.utils.tests 

 

from pfs.datamodel.drp import PfsArm, PfsMerged, PfsReference, PfsSingle, PfsObject 

 

 

class DocstringsTestCase(unittest.TestCase): 

def testDocstrings(self): 

for cls in (PfsArm, PfsMerged, PfsReference, PfsSingle, PfsObject): 

for name, attr in inspect.getmembers(cls): 

if not hasattr(attr, "__doc__") or not attr.__doc__: 

continue 

docstring = attr.__doc__ 

for base in cls.__mro__[1:-1]: 

self.assertNotIn(base.__name__, docstring, 

f"{cls.__name__}.{name}.__doc__ contains {base.__name__}: {docstring}") 

 

 

class TestMemory(lsst.utils.tests.MemoryTestCase): 

pass 

 

 

def setup_module(module): 

lsst.utils.tests.init() 

 

 

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

setup_module(sys.modules["__main__"]) 

unittest.main(failfast=True)