Skip to content
Snippets Groups Projects
Commit 257843d5 authored by Georges Racinet's avatar Georges Racinet :squid:
Browse files

tests: have mercurial import the extension as a package

Specifying the path to `__init__.py` as we previously did
makes Mercurial import it as a standalone module, even
if it is available for regular import as a package.

In turn, this prevents relative imports, as we'd like to
introduce to actually start splitting it.
parent d31cdb0e
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -8,6 +8,8 @@
phases,
ui as uimod,
)
from os.path import dirname
from ..testhelpers import (
LocalRepoWrapper,
NULL_ID,
......@@ -15,7 +17,7 @@
)
import hgext3rd.heptapod
HGEXT_HEPTA_SOURCE = hgext3rd.heptapod.__file__.replace('.pyc', '.py')
HGEXT_HEPTA_SOURCE = dirname(hgext3rd.heptapod.__file__)
def test_init_write_commit(tmpdir):
......
from os.path import dirname
import hgext3rd.heptapod
......@@ -1,5 +2,5 @@
import hgext3rd.heptapod
HGEXT_HEPTA_SOURCE = hgext3rd.heptapod.__file__.replace('.pyc', '.py')
HGEXT_HEPTA_SOURCE = dirname(hgext3rd.heptapod.__file__)
def common_config():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment