UseCases.remote_debug.defaults package

Submodules

UseCases.remote_debug.defaults.CallCase module

Verifies basic facilities for remote debugging by starting a subprocess. Uses:

  • epyunit.SystemCalls()
  • epyunit.callit()

Applies a two-level subprocess stack:

  1. This UseCase
  2. The wrapper ‘epyunit4RDbg.py’
  3. The script with dummy responses for tests ‘myscript.py’
class UseCases.remote_debug.defaults.CallCase.CallUnits(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
classmethod setUpClass()[source]
testCallTwoLevelsOfSubprocesses()[source]

Selftest of the remote debugging feature.

Module contents

The UseCase remote_debug demonstrates and verifies the basic facilities for remote debugging of external Python subprocesses by the PyDev/Eclipse framework.

Therefore three components are provided:

  • calldir/CallUseCase.py

    The main primary call of the UseCase. In dialogue mode this should be started by PyDev debugger from Eclipse.

  • subprocdir/bin/epyunit4RDbg.py

    When stepping over the ‘callit’ statement, the subprocess ‘epyunit4RDbg.py’ initializes itself with the ‘pydevd.py’, and continues under control of the PyDev debugger. The remote debug server has to be started before, see manuals ePyDev!

  • scriptdir/bin/myscript.py

    The script provides hard-coded response output for the test of ePyUnit itself, but also wrapper processes in general.

The following figure depicts the components.
+------------------+         +-----------------+         +-------------+
|                  |         |                 |         |             |
|  CallUseCase.py  |  <--->  | epyunit4RDbg.py |  <--->  | myscript.py |  
|                  |         |                 |         |             |
+------------------+         +-----------------+         +-------------+
         A                            A                         A
         |                            |                         |
      UseCase                 the actual testee            a resource
   frame for tests                                          simulator
REMARK:
This subdirectory for remote debug requires a running instance of PyDev in Eclipse, with a started remote debug server on standard port 5678