Skip to content

Commit 90f539d

Browse files
author
Jon Wayne Parrott
committed
Making nox ignore env and lib dirs.
Change-Id: I1593cb4b0a3032da21d70c2fcbc6b0e466d6b2ca
1 parent 48a09ca commit 90f539d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nox.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,14 @@ def run_tests_in_sesssion(
137137
for reqfile in list_files(dirname, 'requirements*.txt'):
138138
session.install('-r', reqfile)
139139

140+
# Ignore lib and env directories
141+
ignore_args = [
142+
'--ignore', os.path.join(sample, 'lib'),
143+
'--ignore', os.path.join(sample, 'env')]
144+
140145
session.run(
141146
'py.test', sample,
142-
*pytest_args,
147+
*(pytest_args + ignore_args),
143148
success_codes=[0, 5]) # Treat no test collected as success.
144149

145150

0 commit comments

Comments
 (0)