Skip to content

Commit 8a2d427

Browse files
committed
Added Py 2 tests to dataset pkgs
1 parent ca90fce commit 8a2d427

8 files changed

Lines changed: 88 additions & 0 deletions

File tree

computer-languages/noxfile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ def session(func) : return nox.session(venv_backend='none', name=func.__name__.r
88

99
@session
1010
def dev(session) : session.run('pip', 'install', '-e', '.')
11+
@session
12+
def test_py26(session):
13+
from pathlib import Path
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
16+
session.run(
17+
py_cmd, '-2.6', '-c',
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name} ; print({mod_name})'
20+
)
21+
clean(session, '--py2')
1122

1223
@session
1324
def lint(session): # staged project files

data-languages/noxfile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ def session(func) : return nox.session(venv_backend='none', name=func.__name__.r
88

99
@session
1010
def dev(session) : session.run('pip', 'install', '-e', '.')
11+
@session
12+
def test_py26(session):
13+
from pathlib import Path
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
16+
session.run(
17+
py_cmd, '-2.6', '-c',
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name} ; print({mod_name})'
20+
)
21+
clean(session, '--py2')
1122

1223
@session
1324
def lint(session): # staged project files

latin-locales/noxfile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ def session(func) : return nox.session(venv_backend='none', name=func.__name__.r
88

99
@session
1010
def dev(session) : session.run('pip', 'install', '-e', '.')
11+
@session
12+
def test_py26(session):
13+
from pathlib import Path
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
16+
session.run(
17+
py_cmd, '-2.6', '-c',
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name} ; print({mod_name})'
20+
)
21+
clean(session, '--py2')
1122

1223
@session
1324
def lint(session): # staged project files

markup-languages/noxfile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ def session(func) : return nox.session(venv_backend='none', name=func.__name__.r
88

99
@session
1010
def dev(session) : session.run('pip', 'install', '-e', '.')
11+
@session
12+
def test_py26(session):
13+
from pathlib import Path
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
16+
session.run(
17+
py_cmd, '-2.6', '-c',
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name} ; print({mod_name})'
20+
)
21+
clean(session, '--py2')
1122

1223
@session
1324
def lint(session): # staged project files

non-latin-locales/noxfile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ def session(func) : return nox.session(venv_backend='none', name=func.__name__.r
88

99
@session
1010
def dev(session) : session.run('pip', 'install', '-e', '.')
11+
@session
12+
def test_py26(session):
13+
from pathlib import Path
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
16+
session.run(
17+
py_cmd, '-2.6', '-c',
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name} ; print({mod_name})'
20+
)
21+
clean(session, '--py2')
1122

1223
@session
1324
def lint(session): # staged project files

programming-languages/noxfile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ def session(func) : return nox.session(venv_backend='none', name=func.__name__.r
88

99
@session
1010
def dev(session) : session.run('pip', 'install', '-e', '.')
11+
@session
12+
def test_py26(session):
13+
from pathlib import Path
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
16+
session.run(
17+
py_cmd, '-2.6', '-c',
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name} ; print({mod_name})'
20+
)
21+
clean(session, '--py2')
1122

1223
@session
1324
def lint(session): # staged project files

project-markers/noxfile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ def session(func) : return nox.session(venv_backend='none', name=func.__name__.r
88

99
@session
1010
def dev(session) : session.run('pip', 'install', '-e', '.')
11+
@session
12+
def test_py26(session):
13+
from pathlib import Path
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
16+
session.run(
17+
py_cmd, '-2.6', '-c',
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name} ; print({mod_name})'
20+
)
21+
clean(session, '--py2')
1122

1223
@session
1324
def lint(session): # staged project files

prose-languages/noxfile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ def session(func) : return nox.session(venv_backend='none', name=func.__name__.r
88

99
@session
1010
def dev(session) : session.run('pip', 'install', '-e', '.')
11+
@session
12+
def test_py26(session):
13+
from pathlib import Path
14+
src_dir = Path(__file__).parent / 'src'
15+
mod_name = next(src_dir.iterdir()).name
16+
session.run(
17+
py_cmd, '-2.6', '-c',
18+
f"import sys ; sys.path.insert(0, r'{src_dir}') ;" # allow import mod from src
19+
f'import {mod_name} ; print({mod_name})'
20+
)
21+
clean(session, '--py2')
1122

1223
@session
1324
def lint(session): # staged project files

0 commit comments

Comments
 (0)