Skip to content

Commit

Permalink
Adding some helpful comments to the noxfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Wayne Parrott committed Mar 29, 2016
1 parent 41034ff commit 879176b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
14 changes: 14 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os

import pytest
Expand Down
18 changes: 18 additions & 0 deletions nox.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import fnmatch
import os
import tempfile
Expand Down Expand Up @@ -86,8 +100,12 @@ def session_tests(session, interpreter, extra_pytest_args=None):
session.install(REPO_TOOLS_REQ)
session.install('-r', 'requirements-{}-dev.txt'.format(interpreter))

# extra_pytest_args can be send by another session calling this session,
# see session_travis.
pytest_args = COMMON_PYTEST_ARGS + (extra_pytest_args or [])

# session.posargs is any leftover arguments from the command line, which
# allows users to run a particular test instead of all of them.
for sample in (session.posargs or SAMPLES):
session.run(
'py.test', sample,
Expand Down

0 comments on commit 879176b

Please sign in to comment.