You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/tests
Alex Willmer 026669aa93 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.
7 years ago
..
data Beginnings of module_finder_test 7 years ago
README.md Add README.md to tests subdir. 7 years ago
build_docker_image.py Add rsync and git to build_docker_image too. 7 years ago
call_function_test.py core: More robust shutdown 7 years ago
channel_test.py Fix importer_test constructor signature. 7 years ago
fakessh_test.py tests: stop fakessh spamming the logs 7 years ago
first_stage_test.py tests: initial first_stage_test. 7 years ago
id_allocation_test.py Fix importer_test constructor signature. 7 years ago
importer_test.py Fix importer_test constructor signature. 7 years ago
local_test.py Fix context naming for sudo and via=. 7 years ago
master_test.py Simple scan_code_imports test. 7 years ago
module_finder_test.py tests: Fix GetModuleViaPkgutilTest fetching .pyc 7 years ago
nested_test.py frameworkize nested_test. 7 years ago
responder_test.py tests: stop responder_test spamming the logs 7 years ago
select_test.py receiver: only permit one notify callback 7 years ago
ssh_test.py ssh_test: Correct hostname in SShTest.test_stream_name() 7 years ago
testlib.py tests: initial first_stage_test. 7 years ago
utils_test.py Let utils_test run directly too. 7 years ago

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!