mitogen/tests
Alex Willmer 29529c9a5c tests: Fix GetModuleViaPkgutilTest fetching .pyc
On my laptop (Ubuntu 17.10, Python 2.7.14 in a virtualenv),
`test_regular_mod` fails with

```
AssertionError: "\nimport sys\n\n\ndef say_hi():\n    print 'hi'\n" !=
'\x03\xf3\r\n\xbbW\xd5Yc\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00@\x00\x00\x00s\x19\x00\x00\x00d\x00\x00d\x01\x00l\x00\x00Z\x00\x00d\x02\x00\x84\x00\x00Z\x01\x00d\x01\x00S(\x03\x00\x00\x00i\xff\xff\xff\xffNc\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00C\x00\x00\x00s\t\x00\x00\x00d\x01\x00GHd\x00\x00S(\x02\x00\x00\x00Nt\x02\x00\x00\x00hi(\x00\x00\x00\x00(\x00\x00\x00\x00(\x00\x00\x00\x00(\x00\x00\x00\x00sF\x00\x00\x00/home/alex/src/mitogen/tests/data/module_finder_testmod/regular_mod.pyt\x06\x00\x00\x00say_hi\x05\x00\x00\x00s\x02\x00\x00\x00\x00\x01(\x02\x00\x00\x00t\x03\x00\x00\x00sysR\x01\x00\x00\x00(\x00\x00\x00\x00(\x00\x00\x00\x00(\x00\x00\x00\x00sF\x00\x00\x00/home/alex/src/mitogen/tests/data/module_finder_testmod/regular_mod.pyt\x08\x00\x00\x00<module>\x02\x00\x00\x00s\x02\x00\x00\x00\x0c\x03'
```

`__file__` contains the path of the compiled `.pyc`, not the `.py`
source file.
2017-10-20 19:48:26 +01:00
..
data Beginnings of module_finder_test 2017-10-02 13:54:01 +05:30
README.md Add README.md to tests subdir. 2017-09-22 23:46:35 +05:30
build_docker_image.py Add rsync and git to build_docker_image too. 2017-09-17 21:07:32 +05:30
call_function_test.py core: More robust shutdown 2017-10-03 16:35:12 +05:30
channel_test.py Fix importer_test constructor signature. 2017-10-01 15:30:43 +05:30
fakessh_test.py tests: stop fakessh spamming the logs 2017-10-08 19:14:21 +05:30
first_stage_test.py tests: initial first_stage_test. 2017-10-16 20:51:23 +05:30
id_allocation_test.py Fix importer_test constructor signature. 2017-10-01 15:30:43 +05:30
importer_test.py Fix importer_test constructor signature. 2017-10-01 15:30:43 +05:30
local_test.py Fix context naming for sudo and via=. 2017-09-29 16:04:09 +05:30
master_test.py Simple scan_code_imports test. 2017-09-30 13:55:41 +05:30
module_finder_test.py tests: Fix GetModuleViaPkgutilTest fetching .pyc 2017-10-20 19:48:26 +01:00
nested_test.py frameworkize nested_test. 2017-10-02 13:56:02 +05:30
responder_test.py tests: stop responder_test spamming the logs 2017-10-08 19:14:52 +05:30
select_test.py receiver: only permit one notify callback 2017-09-28 10:58:57 +05:30
ssh_test.py ssh_test: Correct hostname in SShTest.test_stream_name() 2017-10-15 20:33:59 +01:00
testlib.py tests: initial first_stage_test. 2017-10-16 20:51:23 +05:30
utils_test.py Let utils_test run directly too. 2017-10-02 14:36:36 +05:30

README.md

Warning

This directory is full of disorganized crap, including random hacks I checked in that I'd like to turn into tests. The effort to write tests only really started in September 2017. Pull requests in this area are very welcome!