Skip to content

Commit a900eaa

Browse files
committed
Aligned Py 2 test w/ dataset ones, rid markers_dir shim
1 parent 8a2d427 commit a900eaa

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

find-project-root/noxfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ def dev(session) : session.run('pip', 'install', '-e', '.')
1111
@session
1212
def test_py26(session):
1313
from pathlib import Path
14-
root = Path(__file__).parent
15-
src_dir = root / 'src'
16-
markers_dir = root.parent / 'project-markers/src'
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
1716
session.run(
1817
py_cmd, '-2.6', '-c',
19-
f"import sys ; sys.path.extend([r'{src_dir}', r'{markers_dir}']) ;"
20-
f'import find_project_root ; print(find_project_root())'
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name} ; print({mod_name}())'
2120
)
2221
clean(session, '--py2')
2322

0 commit comments

Comments
 (0)