New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 667897 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2016
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug-Regression



Sign in to add a comment

net_unittest WebSocketEndToEndTest fail when run in virtualenv

Project Member Reported by mbjorge@google.com, Nov 22 2016

Issue description

What steps will reproduce the problem?
(1) Create/activate a virtualenv
(2) ./net_unittests --gtest_filter=WebSocketEndToEndTest.*

What is the expected result?
Tests run and pass

What happens instead?
Tests crash with an ImportError when testserver.py tries to import base64.

Running python with the -S flag breaks the bootstrapping behaviour of the site.py file in a virtualenv. This can be seen by just running `python -S` in a virtualenv and trying to import base64 (or most other stdlib modules).

Breaking CL: https://codereview.chromium.org/2481823003



 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49e77410bb70d01e8377025eb6473eb6a7602afb

commit 49e77410bb70d01e8377025eb6473eb6a7602afb
Author: mbjorge <mbjorge@chromium.org>
Date: Mon Nov 28 22:31:23 2016

Fix net_unittests when run in a virtualenv.

Passing -S to python breaks in a virtualenv because it cannot
find the stdlib modules (e.g. base64). Only pass -S if not
already in a virtualenv.

BUG= 667897 
TEST=net_unittests inside a virtualenv

Review-Url: https://codereview.chromium.org/2526553002
Cr-Commit-Position: refs/heads/master@{#434739}

[modify] https://crrev.com/49e77410bb70d01e8377025eb6473eb6a7602afb/net/test/python_utils.cc
[modify] https://crrev.com/49e77410bb70d01e8377025eb6473eb6a7602afb/net/test/python_utils.h

Comment 2 by mbjorge@google.com, Nov 28 2016

Status: Fixed (was: Assigned)

Sign in to add a comment