File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 22from copy import copy
33import logging
44import arcade
5+ import inspect
56from arcade import *
67
78
@@ -16,9 +17,13 @@ def test_import():
1617 remaining = arcade_names - common
1718 for name in copy (remaining ):
1819 attr = getattr (arcade , name )
19- if type (attr ) is ModuleType :
20+ if type (attr ) is ModuleType or not inspect . isroutine ( attr ) :
2021 remaining .remove (name )
21- elif not attr .__module__ .startswith ('arcade.' ):
22+ # Extra awful trick because:
23+ # 1. attempting to get __module__ of bool members raises AttributeError
24+ # 2. inspect.isbuiltin(bool) does not return True for bool
25+ # 2. inspect.getmodule(bool) returns the builtins module
26+ elif not inspect .getmodule (attr ).__name__ .startswith ('arcade.' ):
2227 remaining .remove (name )
2328
2429 assert len (remaining ) == 0
You can’t perform that action at this time.
0 commit comments