Skip to content
Snippets Groups Projects
Commit 166169d7 authored by raila's avatar raila
Browse files

Add code suggested by Michal Januszewski <michalj@gmail.com> to ensure that

Python tests run correctly even when a previous version of the library is
already installed.  I was unable to reproduce his problem on my machine but
the fix seems harmless enough.
parent 5b741ca1
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,11 @@ def generate_proto(source):
sys.exit(-1)
def MakeTestSuite():
# This is apparently needed on some systems to make sure that the tests
# work even if a previous version is already installed.
if 'google' in sys.modules:
del sys.modules['google']
generate_proto("../src/google/protobuf/unittest.proto")
generate_proto("../src/google/protobuf/unittest_import.proto")
generate_proto("../src/google/protobuf/unittest_mset.proto")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment