Skip to content

Commit

Permalink
Merge pull request #54 from guyingzhao/master
Browse files Browse the repository at this point in the history
fix runtest error
  • Loading branch information
guyingzhao committed Apr 24, 2019
2 parents 176105c + b6b7f56 commit dc4eb68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion testbase/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import zipfile
import pkg_resources
import subprocess
import six

from testbase import resource
from testbase.conf import settings
Expand Down Expand Up @@ -274,7 +275,8 @@ def activate(self):
created = False
_, _, _, bin_dir = virtualenv.path_locations(venv_path)
activation_script = os.path.join(bin_dir, 'activate_this.py')
execfile(activation_script, dict(__file__=activation_script))
with open(activation_script, "r") as fd:
exec(fd.read(), dict(__file__=activation_script))
if created:
subprocess.call(["pip", "install", self._dist_pkg_path], close_fds=True)

Expand Down

0 comments on commit dc4eb68

Please sign in to comment.