File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ test_files = files(
5050 ' time_test.py' ,
5151 ' touch_test.py' ,
5252 ' transform_test.py' ,
53+ ' typing_test.py' ,
5354 ' version_test.py' ,
5455 ' video_test.py' ,
5556 ' window_test.py' ,
Original file line number Diff line number Diff line change 1+ import unittest
2+
3+ # A basic unit test to test that pygame.typing can import in python code, and
4+ # the documented attributes are accessible.
5+ # More rigorous testing needs mypy and is therefore implemented in the stubs
6+ # directory.
7+ TYPING_PUBLIC_ATTRS = [
8+ "RectLike" ,
9+ "SequenceLike" ,
10+ "FileLike" ,
11+ "ColorLike" ,
12+ "Point" ,
13+ "IntPoint" ,
14+ ]
15+
16+
17+ class TypingTest (unittest .TestCase ):
18+ def test_typing_has_attrs (self ):
19+ import pygame .typing
20+
21+ for i in TYPING_PUBLIC_ATTRS :
22+ self .assertTrue (hasattr (pygame .typing , i ))
23+
24+
25+ if __name__ == "__main__" :
26+ unittest .main ()
You can’t perform that action at this time.
0 commit comments