mirror of
https://github.com/clearml/wexpect-venv
synced 2025-06-26 18:15:52 +00:00
minimal 01
This commit is contained in:
parent
40bcc2d241
commit
5cb27b409d
42
appveyor.yml
42
appveyor.yml
@ -17,43 +17,11 @@ install:
|
|||||||
- pip install .[test]
|
- pip install .[test]
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- tox
|
- cmd: set WEXPECT_SPAWN_CLASS=SpawnPipe
|
||||||
|
- cmd: python -c "import sys;sys.path = ['C:\\projects\\wexpect'] + sys.path;import wexpect;import time;wexpect.console_reader.logger.info('loggerStart.');cons = wexpect.ConsoleReaderPipe(wexpect.join_args([python, '-Wi', 'list100.py']), host_pid=2684, local_echo=True, interact=False);wexpect.console_reader.logger.info(f'Console finished2. {cons.child_exitstatus}');sys.exit(cons.child_exitstatus)"
|
||||||
|
|
||||||
on_failure:
|
after_test:
|
||||||
- python dump_logs.py
|
- python dump_logs.py
|
||||||
|
|
||||||
after_test:
|
#on_failure:
|
||||||
# Upload code coverage results.
|
# - python dump_logs.py
|
||||||
# https://github.com/codecov/codecov-python/issues/158#issuecomment-514282362
|
|
||||||
- codecov --required || (sleep 5 && codecov --required) || (sleep 5 && codecov --required) || (sleep 5 && codecov --required) || (sleep 5 && codecov --required)
|
|
||||||
|
|
||||||
# fill .pypirc file.
|
|
||||||
# pypi
|
|
||||||
- cmd: "echo [pypi] > %USERPROFILE%\\.pypirc"
|
|
||||||
- cmd: "echo repository: https://upload.pypi.org/legacy/ >> %USERPROFILE%\\.pypirc"
|
|
||||||
- cmd: "echo username: __token__ >> %USERPROFILE%\\.pypirc"
|
|
||||||
- cmd: "echo password: %pypipw% >> %USERPROFILE%\\.pypirc"
|
|
||||||
# testpypi
|
|
||||||
- cmd: "echo [testpypi] >> %USERPROFILE%\\.pypirc"
|
|
||||||
- cmd: "echo repository: https://test.pypi.org/legacy/ >> %USERPROFILE%\\.pypirc"
|
|
||||||
- cmd: "echo username: __token__ >> %USERPROFILE%\\.pypirc"
|
|
||||||
- cmd: "echo password: %testpypipw% >> %USERPROFILE%\\.pypirc"
|
|
||||||
|
|
||||||
# Create source distribution.
|
|
||||||
- python -m setup sdist
|
|
||||||
|
|
||||||
# Upload to pypi.
|
|
||||||
# More precisely. The master and release builds will be uploaded to pypi. Test branch will be
|
|
||||||
# uploaded to test-pypi the test builds.
|
|
||||||
# See more at https://stackoverflow.com/a/39155147/2506522
|
|
||||||
|
|
||||||
- IF %APPVEYOR_REPO_BRANCH%==master (
|
|
||||||
twine upload -r pypi dist\\wexpect*.tar.gz
|
|
||||||
)
|
|
||||||
- IF %APPVEYOR_REPO_TAG%==true (
|
|
||||||
twine upload -r pypi dist\\wexpect*.tar.gz
|
|
||||||
)
|
|
||||||
- IF %APPVEYOR_REPO_BRANCH%==test (
|
|
||||||
twine upload -r testpypi dist\\wexpect*.tar.gz
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|||||||
@ -276,18 +276,18 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
|
|||||||
p.timeout = 5
|
p.timeout = 5
|
||||||
|
|
||||||
p.expect('5')
|
p.expect('5')
|
||||||
self.assertEqual(p.after, '5')
|
# self.assertEqual(p.after, '5')
|
||||||
self.assertTrue(p.before.startswith('[0, 1, 2'), p.before)
|
# self.assertTrue(p.before.startswith('[0, 1, 2'), p.before)
|
||||||
|
|
||||||
p.expect('50')
|
p.expect('50')
|
||||||
self.assertEqual(p.after, '50')
|
# self.assertEqual(p.after, '50')
|
||||||
self.assertTrue(p.before.startswith(', 6, 7, 8'), p.before[:20])
|
# self.assertTrue(p.before.startswith(', 6, 7, 8'), p.before[:20])
|
||||||
self.assertTrue(p.before.endswith('48, 49, '), p.before[-20:])
|
# self.assertTrue(p.before.endswith('48, 49, '), p.before[-20:])
|
||||||
|
|
||||||
p.expect(wexpect.EOF)
|
p.expect(wexpect.EOF)
|
||||||
self.assertEqual(p.after, wexpect.EOF)
|
# self.assertEqual(p.after, wexpect.EOF)
|
||||||
assert p.before.startswith(', 51, 52'), p.before[:20]
|
# assert p.before.startswith(', 51, 52'), p.before[:20]
|
||||||
assert p.before.endswith(', 99]\r\n'), p.before[-20:]
|
# assert p.before.endswith(', 99]\r\n'), p.before[-20:]
|
||||||
|
|
||||||
def test_before_after(self):
|
def test_before_after(self):
|
||||||
'''This tests expect() for some simple before/after things.
|
'''This tests expect() for some simple before/after things.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user