It looks like test-run-tests.py and i18n/check-translation.py have a test too. (Not sure if we care about them; I mostly care about Windows.)
It also looks like dispatch.py can be dropped. Presumably mercurial.util being duplicated (once with a testtarget=... and once without) is on purpose, but IDK what that does.
It looks like this needs to be conditionalized, like the Windows module test:
--- c:/Users/Matt/hg/tests/test-doctest.py.out +++ c:/Users/Matt/hg/tests/test-doctest.py.err @@ -0,0 +1,8 @@ +Traceback (most recent call last): + File "c:\Users\Matt\hg\tests\test-doctest.py", line 69, in <module> + testmod('mercurial.posix') + File "c:\Users\Matt\hg\tests\test-doctest.py", line 36, in testmod + __import__(name) + File "c:\Users\Matt\hg\mercurial\posix.py", line 11, in <module> + import fcntl +ImportError: No module named fcntl