1. Ronny Pfannschmidt
  2. glas_process

Commits

Ronny Pfannschmidt  committed 115f17a

adapt using type as doc_type

  • Participants
  • Parent commits e0b348b
  • Branches default

Comments (0)

Files changed (2)

File glas_process/subprocess.py

View file
 def prepare_python(proc, script, _id=None):
     return makestep(
         proc, _id,
-        type='python',
+        variant='python',
         steper='popen',
         args=['python', '-'],
         stdin=script,
 def prepare_subprocess(proc, cmd, _id=None):
     return makestep(
         proc, _id,
-        type='subprocess',
+        variant='subprocess',
         steper='popen',
         args=[str(x) for x in cmd],
         stdin=None,

File testing/test_events.py

View file
     step = prepare_subprocess(procdir, ['ls'], _id='the_ls')
     procdir.run(step)
     checks = [
-        ('doc_type', "juggler:step",
+        ('type', "juggler:step",
          'status', 'prepared'),
-        ('doc_type', "juggler:step",
+        ('type', "juggler:step",
          'status', "running"),
         ('line', 'somefile\n'),
         ('returncode', 0),
-        ('doc_type', "juggler:step",
+        ('type', "juggler:step",
          'status', "complete"),
     ]
     check_events(procdir, checks)
     step = prepare_subprocess(procdir, ['false'])
     procdir.run(step)
     checks = [
-        ('doc_type', "juggler:step",
+        ('type', "juggler:step",
          'status', 'prepared'),
-        ('doc_type', "juggler:step",
+        ('type', "juggler:step",
          'status', "running"),
         ('returncode', 1),
-        ('doc_type', "juggler:step",
+        ('type', "juggler:step",
          'status', "failed"),
     ]
     check_events(procdir, checks)
     doc = prepare_python(procdir, 'print 1\n')
     procdir.run(doc)
     checks = [
-        ('doc_type', "juggler:step",
+        ('type', "juggler:step",
          'status', 'prepared'),
-        ('doc_type', "juggler:step",
+        ('type', "juggler:step",
          'status', "running"),
         ('line', '1\n'),
         ('returncode', 0),
-        ('doc_type', "juggler:step",
+        ('type', "juggler:step",
          'status', "complete"),
     ]
     check_events(procdir, checks)