[FIX] python example issue: #7, [TEST] appveyor codecov

This commit is contained in:
Benedek Racz 2019-09-05 17:51:27 +02:00
parent fb58f671af
commit 813a462475
5 changed files with 10 additions and 4 deletions

View File

@ -35,6 +35,7 @@ child.expect('>')
child.sendline('ls') child.sendline('ls')
child.expect('>') child.expect('>')
print(child.before) print(child.before)
child.sendline('exit')
``` ```
For more information see [examples](./examples) folder. For more information see [examples](./examples) folder.

View File

@ -9,4 +9,4 @@ test_script:
- tox - tox
after_test: after_test:
- bash <(curl -s https://codecov.io/bash) - codecov

View File

@ -3,20 +3,25 @@
from __future__ import print_function from __future__ import print_function
import sys import sys
import wexpect import wexpect
import os
here = os.path.dirname(os.path.realpath(__file__))
# Path of python executable: # Path of python executable:
pythonInterp = sys.executable pythonInterp = sys.executable
prompt = ': ' prompt = ': '
# Start the child process # Start the child process
p = wexpect.spawn(pythonInterp, ['foo.py']) p = wexpect.spawn(pythonInterp, [here + '\\foo.py'])
# Wait for prompt # Wait for prompt
p.expect(prompt) p.expect(prompt)
print(p.before)
# Send the 'small integer' # Send the 'small integer'
p.sendline('3') p.sendline('3')
p.expect(prompt) p.expect(prompt)
print(p.before)
# print the texts # print the texts
print(p.before, end='') print(p.before, end='')

View File

@ -28,4 +28,4 @@ test =
coverage coverage
tox tox
setuptools>=38.0 setuptools>=38.0
codecov

View File

@ -2430,7 +2430,7 @@ class Wtty:
raise raise
self.switchBack() self.switchBack()
class ConsoleReader: class ConsoleReader: # pragma: no cover
def __init__(self, path, pid, tid, env = None, cp=None, logdir=None): def __init__(self, path, pid, tid, env = None, cp=None, logdir=None):
self.logdir = logdir self.logdir = logdir