You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Returns a string that can be used to match errors related to bad units.
97
97
"""
98
-
m="'{0}' did not parse as fits unit: At col {1:d}, Unit 'ergs' not supported by the FITS standard. Did you mean erg?".format(unit, unit.index('ergs'))
98
+
m= ("'{0}' did not parse as fits unit: At col {1:d}, Unit 'ergs' not "+
99
+
"supported by the FITS standard. Did you mean erg?").format(unit, unit.index('ergs'))
99
100
ifself.astropyVersion>=version.parse('4.0'):
100
-
m+=" If this is meant to be a custom unit, define it with 'u.def_unit'. To have it recognized inside a file reader or other code, enable it with 'u.add_enabled_units'. For details, see http://docs.astropy.org/en/latest/units/combining_and_defining.html"
101
+
m+= (" If this is meant to be a custom unit, define it with 'u.def_unit'. "+
102
+
"To have it recognized inside a file reader or other code, enable it with "+
103
+
"'u.add_enabled_units'. For details, see http://docs.astropy.org/en/latest/units/combining_and_defining.html")
self.assertLog(log, -2, "{0} has the wrong number of sections (HDUs) according to {1}, skipping to next candidate.".format(str(modelfile).replace('.rst', '.fits'), modelfile))
474
+
self.assertLog(log, -2, ("{0} has the wrong number of sections (HDUs) "+
f._stub_meta[0]['keywords'].append(('BUNIT', 'erg', 'str', 'This is a test.'))
486
488
f.validate_prototype(error=True)
487
-
self.assertLog(log, -1, "Prototype file {0} has these keywords in HDU0 missing from model: {{'BUNIT'}}".format(str(modelfile).replace('.rst', '.fits')))
489
+
self.assertLog(log, -1, ("Prototype file {0} has these keywords "+
490
+
"in HDU0 missing from model: {{'BUNIT'}}").format(str(modelfile).replace('.rst', '.fits')))
self.assertLog(log, -1, "File %s HDU%d keyword %s has different keyword type according to %s (%s != %s)."% (f.prototype, 0, 'BSCALE', modelfile, 'int', 'float'))
502
+
self.assertLog(log, -1, ("File %s HDU%d keyword %s has different keyword "+
self.assertLog(log, -1, "Prototype file {0} has an extension type mismatch in HDU1 (IMAGE != BINTABLE) according to {1}.".format(str(modelfile).replace('.rst', '.fits'), modelfile))
529
+
self.assertLog(log, -1, ("Prototype file {0} has an extension type "+
530
+
"mismatch in HDU1 (IMAGE != BINTABLE) according "+
self.assertLog(log, -1, "Prototype file {0} has an EXTNAME mismatch in HDU1 (GALAXY != Galaxies) according to {1}.".format(str(modelfile).replace('.rst', '.fits'), modelfile))
546
+
self.assertLog(log, -1, ("Prototype file {0} has an EXTNAME mismatch in "+
0 commit comments