tests: Pretty print Dict when compating for PyStats
Change-Id: I1d93453072d12aa2dd40066f364723de1225b4e0
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
|
||||
import m5
|
||||
@@ -99,8 +100,8 @@ if output != expected_output:
|
||||
print("Output statistics do not match expected:", file=sys.stderr)
|
||||
print("", file=sys.stderr)
|
||||
print("Expected:", file=sys.stderr)
|
||||
print(expected_output, file=sys.stderr)
|
||||
print(json.dumps(expected_output, indent=4), file=sys.stderr)
|
||||
print("", file=sys.stderr)
|
||||
print("Actual:", file=sys.stderr)
|
||||
print(output, file=sys.stderr)
|
||||
print(json.dumps(output, indent=4), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
|
||||
import m5
|
||||
@@ -113,8 +114,8 @@ if output != expected_output:
|
||||
print("Output statistics do not match expected:", file=sys.stderr)
|
||||
print("", file=sys.stderr)
|
||||
print("Expected:", file=sys.stderr)
|
||||
print(expected_output, file=sys.stderr)
|
||||
print(json.dumps(expected_output, indent=4), file=sys.stderr)
|
||||
print("", file=sys.stderr)
|
||||
print("Actual:", file=sys.stderr)
|
||||
print(output, file=sys.stderr)
|
||||
print(json.dumps(output, indent=4), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
|
||||
import m5
|
||||
@@ -174,8 +175,8 @@ if output != expected_output:
|
||||
print("Output statistics do not match expected:", file=sys.stderr)
|
||||
print("", file=sys.stderr)
|
||||
print("Expected:", file=sys.stderr)
|
||||
print(expected_output, file=sys.stderr)
|
||||
print(json.dumps(expected_output, indent=4), file=sys.stderr)
|
||||
print("", file=sys.stderr)
|
||||
print("Actual:", file=sys.stderr)
|
||||
print(output, file=sys.stderr)
|
||||
print(json.dumps(output, indent=4), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
|
||||
import m5
|
||||
@@ -139,8 +140,8 @@ if output != expected_output:
|
||||
print("Output statistics do not match expected:", file=sys.stderr)
|
||||
print("", file=sys.stderr)
|
||||
print("Expected:", file=sys.stderr)
|
||||
print(expected_output, file=sys.stderr)
|
||||
print(json.dumps(expected_output, indent=4), file=sys.stderr)
|
||||
print("", file=sys.stderr)
|
||||
print("Actual:", file=sys.stderr)
|
||||
print(output, file=sys.stderr)
|
||||
print(json.dumps(output, indent=4), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user