@@ -33,8 +33,9 @@ def assertCached(self, name, contents):
33
33
fpath = os .path .join (_getcfg ("cache_dir" ), name )
34
34
self .assertTrue (os .path .exists (fpath ),
35
35
name + " not cached" )
36
- self .assertEqual (contents , files .read (fpath , as_single_string = True ),
37
- "cached file %s contents do not match expected" % name )
36
+ self .assertEqualVerbose (actual = files .read (fpath , as_single_string = True ),
37
+ expected = contents ,
38
+ message = "cached file %s mismatch" % name )
38
39
39
40
def skip_bad_unless_running (self , * services ):
40
41
for svc in services :
@@ -58,7 +59,7 @@ def test_02_xroot_fetch_from_origin(self):
58
59
core .check_system (["xrdcp" , "-d1" , "-N" , "-f" ,
59
60
"root://localhost:%d//%s" % (_getcfg ("origin_xroot_port" ), name ),
60
61
"-" ], "Checking xroot copy from origin" )
61
- self .assertEqual (result , contents , "downloaded file does not match expected " )
62
+ self .assertEqualVerbose (result , contents , "downloaded file mismatch " )
62
63
63
64
def test_03_http_fetch_from_cache (self ):
64
65
name , contents = self .testfiles [1 ]
@@ -69,7 +70,7 @@ def test_03_http_fetch_from_cache(self):
69
70
result = f .read ()
70
71
except IOError as e :
71
72
self .fail ("Unable to download from cache via http: %s" % e )
72
- self .assertEqual (result , contents , "downloaded file does not match expected " )
73
+ self .assertEqualVerbose (result , contents , "downloaded file mismatch " )
73
74
self .assertCached (name , contents )
74
75
75
76
def test_04_xroot_fetch_from_cache (self ):
@@ -78,7 +79,7 @@ def test_04_xroot_fetch_from_cache(self):
78
79
core .check_system (["xrdcp" , "-d1" , "-N" , "-f" ,
79
80
"root://localhost:%d//%s" % (_getcfg ("cache_xroot_port" ), name ),
80
81
"-" ], "Checking xroot copy from cache" )
81
- self .assertEqual (result , contents , "downloaded file does not match expected " )
82
+ self .assertEqualVerbose (result , contents , "downloaded file mismatch " )
82
83
self .assertCached (name , contents )
83
84
84
85
def test_05_stashcp (self ):
@@ -90,5 +91,5 @@ def test_05_stashcp(self):
90
91
core .check_system (command + ["/" + name , tf .name ],
91
92
"Checking stashcp" )
92
93
result = tf .read ()
93
- self .assertEqual (result , contents , "stashcp'ed file does match expected " )
94
+ self .assertEqualVerbose (result , contents , "stashcp'ed file mismatch " )
94
95
self .assertCached (name , contents )
0 commit comments