mirror of
https://github.com/clearml/wexpect-venv
synced 2025-03-03 18:51:55 +00:00
[FIX] python example issue: #7, [TEST] appveyor codecov
This commit is contained in:
parent
fb58f671af
commit
813a462475
@ -35,6 +35,7 @@ child.expect('>')
|
||||
child.sendline('ls')
|
||||
child.expect('>')
|
||||
print(child.before)
|
||||
child.sendline('exit')
|
||||
```
|
||||
|
||||
For more information see [examples](./examples) folder.
|
||||
|
@ -9,4 +9,4 @@ test_script:
|
||||
- tox
|
||||
|
||||
after_test:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
- codecov
|
||||
|
@ -3,20 +3,25 @@
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
import wexpect
|
||||
import os
|
||||
|
||||
here = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
# Path of python executable:
|
||||
pythonInterp = sys.executable
|
||||
prompt = ': '
|
||||
|
||||
# Start the child process
|
||||
p = wexpect.spawn(pythonInterp, ['foo.py'])
|
||||
p = wexpect.spawn(pythonInterp, [here + '\\foo.py'])
|
||||
|
||||
# Wait for prompt
|
||||
p.expect(prompt)
|
||||
print(p.before)
|
||||
|
||||
# Send the 'small integer'
|
||||
p.sendline('3')
|
||||
p.expect(prompt)
|
||||
print(p.before)
|
||||
|
||||
# print the texts
|
||||
print(p.before, end='')
|
||||
|
@ -2430,7 +2430,7 @@ class Wtty:
|
||||
raise
|
||||
self.switchBack()
|
||||
|
||||
class ConsoleReader:
|
||||
class ConsoleReader: # pragma: no cover
|
||||
|
||||
def __init__(self, path, pid, tid, env = None, cp=None, logdir=None):
|
||||
self.logdir = logdir
|
||||
|
Loading…
Reference in New Issue
Block a user