File tree Expand file tree Collapse file tree 1 file changed +32
-4
lines changed Expand file tree Collapse file tree 1 file changed +32
-4
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env python
22from __future__ import print_function
3+ from pprint import pformat
34import argparse
45import errno
56import fnmatch
@@ -140,11 +141,38 @@ class SanityTests(unittest.TestCase):
140141 with open (absolute_path ) as schema_file :
141142 files [absolute_path ] = json .load (schema_file )
142143
144+ expected = {
145+ os .path .join (REMOTES_DIR , path ): contents
146+ for path , contents in REMOTES .iteritems ()
147+ }
148+
149+ missing = set (files ).symmetric_difference (expected )
150+ changed = {
151+ path
152+ for path , contents in expected .items ()
153+ if path in files
154+ and contents != files [path ]
155+ }
156+
143157 self .assertEqual (
144- files , {
145- os .path .join (REMOTES_DIR , path ): contents
146- for path , contents in REMOTES .iteritems ()
147- },
158+ files ,
159+ expected ,
160+ msg = textwrap .dedent (
161+ """
162+ Remotes in the remotes/ directory do not match those in the
163+ ``jsonschema_suite`` Python script.
164+
165+ Unfortunately for the minute, each remote file is duplicated in
166+ two places.""" + ("""
167+
168+ Only present in one location:
169+
170+ {}""" .format ("\n " .join (missing )) if missing else "" ) + ("""
171+
172+ Conflicting between the two:
173+
174+ {}""" .format ("\n " .join (changed )) if changed else "" )
175+ )
148176 )
149177
150178
You can’t perform that action at this time.
0 commit comments