Skip to content

Commit

Permalink
Merge pull request #5 from plone/python3
Browse files Browse the repository at this point in the history
Fix for python 3
  • Loading branch information
pbauer authored Sep 19, 2018
2 parents 0cf6ba0 + 3abfed4 commit 655ccb6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ New:

Fixes:

- *add item here*
- Fix imports when buildout was installed using pip.
[davisagli]


1.5 (2015-03-21)
Expand Down
7 changes: 4 additions & 3 deletions src/plone/recipe/alltests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import os
import re

from zc.buildout import easy_install
from zc.recipe.egg import Egg


EXCLUDE_PACKAGES = set((
'distribute',
Expand All @@ -17,6 +14,8 @@
class Recipe(object):

def __init__(self, buildout, name, options):
from zc.recipe.egg import Egg

self.buildout, self.options, self.name = buildout, options, name
self.egg = Egg(buildout, options['recipe'], options)

Expand All @@ -41,6 +40,8 @@ def __init__(self, buildout, name, options):
)

def install(self):
from zc.buildout import easy_install

options = self.options
location = options['location']

Expand Down
14 changes: 7 additions & 7 deletions src/plone/recipe/alltests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def run_test(name, script, path, arg, package):
error = False
print RUNNING_TESTS % name
print(RUNNING_TESTS % name)
sys.stdout.flush()
value = os.system(TEST_COMMAND % dict(
script=script,
Expand All @@ -19,7 +19,7 @@ def run_test(name, script, path, arg, package):
))
if value > 0:
error = True
print FINISHED_TESTS % name
print(FINISHED_TESTS % name)
sys.stdout.flush()
return error

Expand Down Expand Up @@ -73,13 +73,13 @@ def main(args):
errors.append(package)

if len(errors):
print "Packages with test failures:\n"
print("Packages with test failures:\n")
for e in errors:
print 'Failing tests in %s' % e
print "\nTotal time elapsed: %.3f seconds" % (time.time() - start)
print "\nGrand total: %d packages, %d failures\n" % (
print('Failing tests in %s' % e)
print("\nTotal time elapsed: %.3f seconds" % (time.time() - start))
print("\nGrand total: %d packages, %d failures\n" % (
total_packages, len(errors)
)
))

if len(errors) > 0:
sys.exit(1)
Expand Down

0 comments on commit 655ccb6

Please sign in to comment.