Commit Graph

16 Commits

Author SHA1 Message Date
Alex Willmer e3b700b553 tests: Fix no such option -o running FakeSsh.test_okay()
Full output of failed test

```
ERROR: test_okay (__main__.FakeSshTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/ssh_test.py", line 16, in test_okay
    ssh_path=testlib.data_path('fakessh.py'),
  File "/home/alex/src/mitogen/mitogen/master.py", line 650, in ssh
    return self.connect('ssh', **kwargs)
  File "/home/alex/src/mitogen/mitogen/parent.py", line 463, in connect
    return self._connect(context_id, klass, name=name, **kwargs)
  File "/home/alex/src/mitogen/mitogen/parent.py", line 449, in _connect
    stream.connect()
  File "/home/alex/src/mitogen/mitogen/ssh.py", line 104, in connect
    super(Stream, self).connect()
  File "/home/alex/src/mitogen/mitogen/parent.py", line 395, in connect
    self._connect_bootstrap()
  File "/home/alex/src/mitogen/mitogen/ssh.py", line 116, in
_connect_bootstrap
    time.time() + 10.0):
  File "/home/alex/src/mitogen/mitogen/parent.py", line 207, in
iter_read
    (''.join(bits)[-300:],)
mitogen.core.StreamError: EOF on stream; last 300 bytes received:
'Usage: fakessh.py [options]\n\nfakessh.py: error: no such option: -o\n'
```
2018-03-19 21:58:34 +05:45
Alex Willmer 4fb1b928b7 Adjust unittest for master -> parent split
Tests should now match changes in
4d31300dd0
2018-03-19 21:58:29 +05:45
David Wilson b2909ee5f4 Replace nasty print statements in six_brokenpkg. 2018-03-19 21:58:28 +05:45
Alex Willmer 3831ac360f Replace all calls to file() with open()
Although these are synonyms in Python 2.x, when using MyPy to typecheck
code use of file() causes spurious errors.

This commit also serves as one small step to Python 3.x compatibility,
since 3.x removes the file() builtin.
2018-03-19 21:58:27 +05:45
David Wilson 15bf0f54e2 Beginnings of module_finder_test 2018-03-19 21:35:37 +05:45
David Wilson 750e9fab24 Make log_to_file accept string level rather than logging package constant
Saves an import, pain in the ass to type all the time.
2018-03-19 21:35:35 +05:45
David Wilson 1411790f56 master: make write_all() handle O_NONBLOCK and deadlines. 2018-03-19 21:35:35 +05:45
David Wilson db225638f0 core: Make iter_read() handle deadline (and non-blocking IO) properly 2018-03-19 21:35:35 +05:45
David Wilson c67119501b Keep allocate_id() in the enhanced router class. 2018-03-19 21:35:35 +05:45
David Wilson 4720eb1c55 core: add ALLOCATE_ID message for fakessh. 2018-03-19 21:35:35 +05:45
David Wilson 498f961488 Fix up a few more ssh_tests, stop sending 400 modules over network.
Defining functions in the current module was causing the entirety of
py.test and all dependencies to be sucked in.
2018-03-19 21:35:35 +05:45
David Wilson e2d3ac9b6a Fixup some more tests. 2018-03-19 21:35:35 +05:45
David Wilson 91ff12f8d8 Import Docker build script for integration tests 2018-03-19 21:35:17 +05:45
David Wilson 1f99dcb435 fix unbelievably dumb variable shadowing 2018-03-19 21:35:17 +05:45
David Wilson 25e4724bac A few more mitogen.slave/master changes 2018-03-19 21:35:17 +05:45
David Wilson e7ff6259a3 Initial commit. 2018-03-19 21:35:13 +05:45