Skip to content

Commit

Permalink
Adding fake gRPC directory so that unit tests can run without it.
Browse files Browse the repository at this point in the history
This is a temporary workaround for gRPC's install issues. The
system tests still require gRPC to be installed.
  • Loading branch information
dhermes committed Aug 27, 2015
1 parent f564434 commit 2958db1
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 4 deletions.
13 changes: 13 additions & 0 deletions _fake_grpc/grpc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2015 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.
13 changes: 13 additions & 0 deletions _fake_grpc/grpc/_adapter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2015 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.
13 changes: 13 additions & 0 deletions _fake_grpc/grpc/_adapter/_c.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2015 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.
13 changes: 13 additions & 0 deletions _fake_grpc/grpc/early_adopter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2015 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.
13 changes: 13 additions & 0 deletions _fake_grpc/grpc/early_adopter/implementations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2015 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.
13 changes: 13 additions & 0 deletions _fake_grpc/grpc/framework/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2015 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.
13 changes: 13 additions & 0 deletions _fake_grpc/grpc/framework/alpha/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2015 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.
13 changes: 13 additions & 0 deletions _fake_grpc/grpc/framework/alpha/utilities.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2015 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.
5 changes: 4 additions & 1 deletion scripts/nose_with_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@

set -ev

export LD_LIBRARY_PATH=$(brew --prefix)/lib
if [[ -n "$(which brew)" ]]; then
export LD_LIBRARY_PATH=$(brew --prefix)/lib
fi

nosetests ${@}
5 changes: 4 additions & 1 deletion scripts/sphinx_with_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@

set -ev

export LD_LIBRARY_PATH=$(brew --prefix)/lib
if [[ -n "$(which brew)" ]]; then
export LD_LIBRARY_PATH=$(brew --prefix)/lib
fi

sphinx-build ${@}
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ envlist =
commands =
{toxinidir}/scripts/nose_with_env.sh
deps =
grpcio
nose
unittest2
setenv =
PYTHONPATH = {toxinidir}/_fake_grpc

[testenv:cover]
basepython =
Expand Down Expand Up @@ -46,6 +47,7 @@ deps =
nose
unittest2
passenv = GOOGLE_* GCLOUD_* GRPC_TRACE
setenv =

[testenv:docs]
basepython =
Expand All @@ -54,6 +56,5 @@ commands =
python -c "import shutil; shutil.rmtree('docs/_build', ignore_errors=True)"
{toxinidir}/scripts/sphinx_with_env.sh -W -b html -d docs/_build/doctrees docs docs/_build/html
deps =
grpcio
Sphinx
passenv = SPHINX_RELEASE

0 comments on commit 2958db1

Please sign in to comment.