当前位置: 首页>>代码示例>>Python>>正文


Python report.parse函数代码示例

本文整理汇总了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))
开发者ID:bibliodrone,项目名称:pycounter,代码行数:7,代码来源:test_unicode.py

示例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()
开发者ID:pitthsls,项目名称:pycounter,代码行数:7,代码来源:test_output_br1.py

示例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()
开发者ID:avorio,项目名称:pycounter,代码行数:9,代码来源:test_output_jr1.py

示例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))
开发者ID:pitthsls,项目名称:pycounter,代码行数:3,代码来源:conftest.py

示例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))
开发者ID:pitthsls,项目名称:pycounter,代码行数:3,代码来源:conftest.py

示例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))
开发者ID:pitthsls,项目名称:pycounter,代码行数:3,代码来源:conftest.py

示例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))
开发者ID:pitthsls,项目名称:pycounter,代码行数:3,代码来源:conftest.py

示例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))
开发者ID:pitthsls,项目名称:pycounter,代码行数:3,代码来源:conftest.py

示例9: setUp

 def setUp(self):
     self.report = report.parse(os.path.join(os.path.dirname(__file__),
                                             'data/tsvC4JR1'))
开发者ID:avorio,项目名称:pycounter,代码行数:3,代码来源:test_filetype_detection.py

示例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)
开发者ID:Wooble,项目名称:pycounter,代码行数:4,代码来源:test_unicode.py

示例11: setUp

 def setUp(self):
     self.filename = os.path.join(os.path.dirname(__file__),
                                  'data/simpleJR1.tsv')
     self.rep = report.parse(self.filename)
开发者ID:chill17,项目名称:pycounter,代码行数:4,代码来源:test_output_jr1.py

示例12: setUp

 def setUp(self):
     self.report = report.parse(
         os.path.join(os.path.dirname(__file__), "data/C4JR1my.csv")
     )
开发者ID:Wooble,项目名称:pycounter,代码行数:4,代码来源:test_jr1_csv.py

示例13: csv_jr1_r4_report

def csv_jr1_r4_report(request):
    return report.parse(os.path.join(os.path.dirname(__file__), "data", request.param))
开发者ID:Wooble,项目名称:pycounter,代码行数:2,代码来源:conftest.py

示例14: setUp

 def setUp(self):
     self.report = report.parse(os.path.join(os.path.dirname(__file__),
                                'data/JR1.xlsx'))
开发者ID:bibliodrone,项目名称:pycounter,代码行数:3,代码来源:test_jr1_xslx.py


注:本文中的pycounter.report.parse函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。