예제 #1
0
 def __repr__(self):
     summary = ["<indexfetcher.erddap>"]
     summary.append("Name: %s" % self.definition)
     summary.append("API: %s" % api_server)
     summary.append("Domain: %s" % format_oneline(self.cname()))
     return '\n'.join(summary)
예제 #2
0
def test_format_oneline():
    s = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"
    assert isinstance(format_oneline(s), str)
    assert isinstance(format_oneline(s[0:5]), str)
    s = format_oneline(s, max_width=12)
    assert isinstance(s, str) and len(s) == 12
예제 #3
0
 def __repr__(self):
     summary = ["<datafetcher.argovis>"]
     summary.append("Name: %s" % self.definition)
     summary.append("API: %s" % api_server)
     summary.append("Domain: %s" % format_oneline(self.cname()))
     return "\n".join(summary)
예제 #4
0
 def __repr__(self):
     summary = ["<datafetcher.localftp>"]
     summary.append("Name: %s" % self.definition)
     summary.append("FTP: %s" % self.local_ftp)
     summary.append("Domain: %s" % format_oneline(self.cname()))
     return '\n'.join(summary)