File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1616try :
1717 import umodbus
1818except ImportError :
19- raise SystemExit ("umodbus has to be importable" )
19+ raise SystemExit ("umodbus and fakes have to be importable" )
2020else :
2121 # Inject mock modules so that we can build the
2222 # documentation without having the real stuff available
2323 from mock import Mock
24+ from fakes import machine
2425
25- for mod_name in ['micropython' , 'machine' , 'urequests' ]:
26- sys .modules [mod_name ] = Mock ()
27- print ("Mocked {}" .format (mod_name ))
26+ sys .modules ['micropython' ] = Mock ()
27+ print ("Mocked 'micropython' module" )
28+ sys .modules ['machine' ] = machine
29+ print ("Imported 'machine' module from 'fakes'" )
2830
2931# load elements of version.py
3032exec (open (here / '..' / 'umodbus' / 'version.py' ).read ())
3133
3234# -- Project information
3335
3436project = 'micropython-modbus'
35- copyright = '2022 , brainelectronics'
37+ copyright = '2023 , brainelectronics'
3638author = 'brainelectronics'
3739
3840version = __version__
You can’t perform that action at this time.
0 commit comments