예제 #1
0
파일: nose_sections.py 프로젝트: 50wu/gpdb
 def finalize(self, result):
     """
     Finalize: stop recording coverage info, save & exit.
     """
     figleaf.stop()
     
     fp = open(self.figleaf_file, 'w')
     figleaf.dump_pickled_coverage(fp)
     fp.close()
예제 #2
0
    def finalize(self, result):
        """
        Finalize: stop recording coverage info, save & exit.
        """
        figleaf.stop()

        fp = open(self.figleaf_file, 'w')
        figleaf.dump_pickled_coverage(fp)
        fp.close()
예제 #3
0
파일: pytest_da.py 프로젝트: wtpayne/hiai
def pytest_sessionfinish(session, exitstatus):          # pylint: disable=W0613
    """
    Write out figleaf coverage report for the test session.

    """
    figleaf.stop()
    filepath_coverage_log = session.config.known_args_namespace.coverage_log
    with open(filepath_coverage_log, 'wb') as file:
        figleaf.dump_pickled_coverage(file)
예제 #4
0
파일: tst-sections.py 프로젝트: ctb/figleaf
import figleaf
figleaf.start()

def a():
    print 'this is a'

def b():
    print 'this is b'

def c():
    print 'this is c'

figleaf.start_section('foo')
a()
figleaf.start_section('bar')
b()
figleaf.stop_section()
c()

figleaf.stop()
figleaf.dump_pickled_coverage(open('.figleaf_sections', 'wb'))