本文整理汇总了Python中pycounter.report.parse函数的典型用法代码示例。如果您正苦于以下问题:Python parse函数的具体用法?Python parse怎么用?Python parse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parse函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_csv_unicode
def test_csv_unicode(self):
rep = report.parse(os.path.join(os.path.dirname(__file__),
'data/simpleJR1.csv'))
self.assertTrue(isinstance(rep.pubs[0].title, text_type))
self.assertTrue(isinstance(rep.pubs[0].publisher, text_type))
self.assertTrue(isinstance(rep.pubs[0].platform, text_type))
示例2: setUp
def setUp(self):
filename = os.path.join(os.path.dirname(__file__), "data/C4BR2.tsv")
rep = report.parse(filename)
with csvhelper.UnicodeReader(filename, delimiter="\t") as report_reader:
self.file_content = list(report_reader)
self.output_content = rep.as_generic()
示例3: setUp
def setUp(self):
self.filename = os.path.join(os.path.dirname(__file__),
'data/simpleJR1.tsv')
self.rep = report.parse(self.filename)
with csvhelper.UnicodeReader(self.filename,
delimiter=',') as report_reader:
self.file_content = list(report_reader)
self.output_content = self.rep.as_generic()
示例4: jr1_report_xlsx
def jr1_report_xlsx(request):
"""Excel formatted JR1 reports."""
return report.parse(os.path.join(os.path.dirname(__file__), "data", request.param))
示例5: csv_jr1_r4_report
def csv_jr1_r4_report(request):
"""Revision 4 JR1 reports."""
return report.parse(os.path.join(os.path.dirname(__file__), "data", request.param))
示例6: csv_jr1_report_common_data
def csv_jr1_report_common_data(request):
"""JR1 reports with shared common data we can make assertions about."""
return report.parse(os.path.join(os.path.dirname(__file__), "data", request.param))
示例7: csv_jr1_report_std
def csv_jr1_report_std(request):
"""Standard (non-GOA) JR1 reports."""
return report.parse(os.path.join(os.path.dirname(__file__), "data", request.param))
示例8: csv_jr1_report
def csv_jr1_report(request):
"""Various CSV format JR1 reports."""
return report.parse(os.path.join(os.path.dirname(__file__), "data", request.param))
示例9: setUp
def setUp(self):
self.report = report.parse(os.path.join(os.path.dirname(__file__),
'data/tsvC4JR1'))
示例10: test_unicode_fields
def test_unicode_fields(filename, attribute):
"""All parsers should return text fields as unicode"""
rep = report.parse(os.path.join(os.path.dirname(__file__), "data", filename))
assert isinstance(getattr(rep.pubs[0], attribute), text_type)
示例11: setUp
def setUp(self):
self.filename = os.path.join(os.path.dirname(__file__),
'data/simpleJR1.tsv')
self.rep = report.parse(self.filename)
示例12: setUp
def setUp(self):
self.report = report.parse(
os.path.join(os.path.dirname(__file__), "data/C4JR1my.csv")
)
示例13: csv_jr1_r4_report
def csv_jr1_r4_report(request):
return report.parse(os.path.join(os.path.dirname(__file__), "data", request.param))
示例14: setUp
def setUp(self):
self.report = report.parse(os.path.join(os.path.dirname(__file__),
'data/JR1.xlsx'))