Skip to content

Commit f1531da

Browse files
committed
Added test_py26 session
1 parent bc06a3b commit f1531da

6 files changed

Lines changed: 72 additions & 6 deletions

File tree

find-project-root/noxfile.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ def session(func) : return nox.session(venv_backend='none')(func)
1313

1414
@session
1515
def dev(session) : session.run('pip', 'install', '-e', '.')
16+
@session
17+
def test_py26(session):
18+
root = Path(__file__).parent
19+
src_dir = root / 'src'
20+
markers_dir = root.parent / 'project-markers/src'
21+
session.run(
22+
'py', '-2.6', '-c',
23+
f"import sys ; sys.path.extend([r'{src_dir}', r'{markers_dir}']) ;"
24+
f'import find_project_root ; print(find_project_root())'
25+
)
26+
clean(session, '--py2')
1627

1728
@session
1829
def bump_patch(session, no_push=True):
@@ -48,4 +59,4 @@ def deploy_feat(session) : deploy_minor(session)
4859
def deploy_major(session) : bump_major(session, no_push=False) ; build(session) ; publish(session)
4960

5061
@session
51-
def clean(session) : session.run('py', paths.utils.clean)
62+
def clean(session, *args) : session.run('py', paths.utils.clean, *args)

latin-locales/noxfile.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ def session(func) : return nox.session(venv_backend='none')(func)
1313

1414
@session
1515
def dev(session) : session.run('pip', 'install', '-e', '.')
16+
@session
17+
def test_py26(session):
18+
root = Path(__file__).parent
19+
src_dir = root / 'src'
20+
markers_dir = root.parent / 'project-markers/src'
21+
session.run(
22+
'py', '-2.6', '-c',
23+
f"import sys ; sys.path.extend([r'{src_dir}', r'{markers_dir}']) ;"
24+
f'import find_project_root ; print(find_project_root())'
25+
)
26+
clean(session, '--py2')
1627

1728
@session
1829
def bump_patch(session, no_push=True):
@@ -48,4 +59,4 @@ def deploy_feat(session) : deploy_minor(session)
4859
def deploy_major(session) : bump_major(session, no_push=False) ; build(session) ; publish(session)
4960

5061
@session
51-
def clean(session) : session.run('py', paths.utils.clean)
62+
def clean(session, *args) : session.run('py', paths.utils.clean, *args)

non-latin-locales/noxfile.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ def session(func) : return nox.session(venv_backend='none')(func)
1313

1414
@session
1515
def dev(session) : session.run('pip', 'install', '-e', '.')
16+
@session
17+
def test_py26(session):
18+
root = Path(__file__).parent
19+
src_dir = root / 'src'
20+
markers_dir = root.parent / 'project-markers/src'
21+
session.run(
22+
'py', '-2.6', '-c',
23+
f"import sys ; sys.path.extend([r'{src_dir}', r'{markers_dir}']) ;"
24+
f'import find_project_root ; print(find_project_root())'
25+
)
26+
clean(session, '--py2')
1627

1728
@session
1829
def bump_patch(session, no_push=True):
@@ -48,4 +59,4 @@ def deploy_feat(session) : deploy_minor(session)
4859
def deploy_major(session) : bump_major(session, no_push=False) ; build(session) ; publish(session)
4960

5061
@session
51-
def clean(session) : session.run('py', paths.utils.clean)
62+
def clean(session, *args) : session.run('py', paths.utils.clean, *args)

project-markers/noxfile.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ def session(func) : return nox.session(venv_backend='none')(func)
1313

1414
@session
1515
def dev(session) : session.run('pip', 'install', '-e', '.')
16+
@session
17+
def test_py26(session):
18+
root = Path(__file__).parent
19+
src_dir = root / 'src'
20+
markers_dir = root.parent / 'project-markers/src'
21+
session.run(
22+
'py', '-2.6', '-c',
23+
f"import sys ; sys.path.extend([r'{src_dir}', r'{markers_dir}']) ;"
24+
f'import find_project_root ; print(find_project_root())'
25+
)
26+
clean(session, '--py2')
1627

1728
@session
1829
def bump_patch(session, no_push=True):
@@ -48,4 +59,4 @@ def deploy_feat(session) : deploy_minor(session)
4859
def deploy_major(session) : bump_major(session, no_push=False) ; build(session) ; publish(session)
4960

5061
@session
51-
def clean(session) : session.run('py', paths.utils.clean)
62+
def clean(session, *args) : session.run('py', paths.utils.clean, *args)

remove-json-keys/noxfile.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ def session(func) : return nox.session(venv_backend='none')(func)
1515
def dev(session) : session.run('pip', 'install', '-e', '.') ; session.run(pkg.dir, '--help', *session.posargs)
1616
@session
1717
def debug(session) : session.run('py', '-m', pkg.name, '--debug', *session.posargs, env={ 'PYTHONPATH': 'src' })
18+
@session
19+
def test_py26(session):
20+
root = Path(__file__).parent
21+
src_dir = root / 'src'
22+
markers_dir = root.parent / 'project-markers/src'
23+
session.run(
24+
'py', '-2.6', '-c',
25+
f"import sys ; sys.path.extend([r'{src_dir}', r'{markers_dir}']) ;"
26+
f'import find_project_root ; print(find_project_root())'
27+
)
28+
clean(session, '--py2')
1829

1930
@session
2031
def bump_patch(session, no_push=True):
@@ -50,4 +61,4 @@ def deploy_feat(session) : deploy_minor(session)
5061
def deploy_major(session) : bump_major(session, no_push=False) ; build(session) ; publish(session)
5162

5263
@session
53-
def clean(session) : session.run('py', paths.utils.clean)
64+
def clean(session, *args) : session.run('py', paths.utils.clean, *args)

translate-messages/noxfile.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ def session(func) : return nox.session(venv_backend='none')(func)
1515
def dev(session) : session.run('pip', 'install', '-e', '.') ; session.run(pkg.dir, '--help', *session.posargs)
1616
@session
1717
def debug(session) : session.run('py', '-m', pkg.name, '--debug', *session.posargs, env={ 'PYTHONPATH': 'src' })
18+
@session
19+
def test_py26(session):
20+
root = Path(__file__).parent
21+
src_dir = root / 'src'
22+
markers_dir = root.parent / 'project-markers/src'
23+
session.run(
24+
'py', '-2.6', '-c',
25+
f"import sys ; sys.path.extend([r'{src_dir}', r'{markers_dir}']) ;"
26+
f'import find_project_root ; print(find_project_root())'
27+
)
28+
clean(session, '--py2')
1829

1930
@session
2031
def bump_patch(session, no_push=True):
@@ -50,4 +61,4 @@ def deploy_feat(session) : deploy_minor(session)
5061
def deploy_major(session) : bump_major(session, no_push=False) ; build(session) ; publish(session)
5162

5263
@session
53-
def clean(session) : session.run('py', paths.utils.clean)
64+
def clean(session, *args) : session.run('py', paths.utils.clean, *args)

0 commit comments

Comments
 (0)