mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-27 15:09:33 +00:00
Fix python scripts for python 3 (print now a function rather than a keyword)
This commit is contained in:
parent
91ea20c4cc
commit
77c9edfcdb
3 changed files with 20 additions and 14 deletions
|
@ -1,3 +1,5 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
@ -66,20 +68,20 @@ def approve( baseName, args ):
|
|||
rawFile.close()
|
||||
|
||||
os.remove( rawResultsPath )
|
||||
print
|
||||
print baseName + ":"
|
||||
print()
|
||||
print( baseName + ":" )
|
||||
if os.path.exists( baselinesPath ):
|
||||
diffResult = subprocess.call([ "diff", baselinesPath, filteredResultsPath ] )
|
||||
if diffResult == 0:
|
||||
os.remove( filteredResultsPath )
|
||||
print " \033[92mResults matched"
|
||||
print( " \033[92mResults matched" )
|
||||
else:
|
||||
print " \n****************************\n \033[91mResults differed"
|
||||
print( " \n****************************\n \033[91mResults differed" )
|
||||
if diffResult > overallResult:
|
||||
overallResult = diffResult
|
||||
print "\033[0m"
|
||||
print( "\033[0m" )
|
||||
else:
|
||||
print " first approval"
|
||||
print( " first approval" )
|
||||
if overallResult == 0:
|
||||
overallResult = 1
|
||||
|
||||
|
@ -95,5 +97,5 @@ approve( "junit.sw", ["~_", "-s", "-w", "NoAssertions", "-r", "junit"] )
|
|||
approve( "xml.sw", ["~_", "-s", "-w", "NoAssertions", "-r", "xml"] )
|
||||
|
||||
if overallResult != 0:
|
||||
print "run approve.py to approve new baselines"
|
||||
print( "run approve.py to approve new baselines" )
|
||||
exit( overallResult)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue