This is an archive of the discontinued Mercurial Phabricator instance.

tests: make test-doctest.t module list match reality
ClosedPublic

Authored by spectral on Mar 13 2020, 12:12 AM.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

spectral created this revision.Mar 13 2020, 12:12 AM
mharbison72 requested changes to this revision.Mar 13 2020, 1:06 AM
mharbison72 added a subscriber: mharbison72.

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.

tests/test-doctest.py
69

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
This revision now requires changes to proceed.Mar 13 2020, 1:06 AM
spectral updated this revision to Diff 20766.Mar 13 2020, 1:21 AM

Should we try to move to some automatic detection of file with doctest? That would be more reliable.

mharbison72 accepted this revision.Mar 13 2020, 12:54 PM
spectral marked an inline comment as done.Mar 13 2020, 10:32 PM

Should we try to move to some automatic detection of file with doctest? That would be more reliable.

D8294, though it got a bit complicated :)

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.