Check-in [5bccb99b46]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Ensure integer division in all Python versions.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5bccb99b467604ecbd5a8bda3692226893beb5b1
User & Date: mrh 2015-05-20 23:54:44
Context
2015-05-21
11:16
Standardize treatment of all output statistics in ptc_out_diff.py script now that cap_frac is expressed as a percentage (rather than a decimal) fraction. check-in: e96f1e046d user: mrh tags: trunk
2015-05-20
23:54
Ensure integer division in all Python versions. check-in: 5bccb99b46 user: mrh tags: trunk
23:44
Convert cap_fraction from decimal to percentage fraction in all test/*output file as described in ticket [d7804c068e]. check-in: d4b6caf8ea user: mrh tags: trunk
Changes

Changes to utilities.py.

99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
        """
        line_list = diff_block.splitlines()
        len_line_list = len(line_list)
        if len_line_list < 4 or len_line_list % 2 != 0:
            sys.stdout.write('ERROR: diff block not an even number of lines:\n')
            sys.stdout.write(diff_block)
            return
        num_line_pairs = (len_line_list - 2) / 2
        aln_first = 1
        eln_first = 2 + num_line_pairs
        for num in range(num_line_pairs):
            aln = aln_first + num
            eln = eln_first + num
            write_significant_line_diff(line_list[aln], line_list[eln])
    # end of process_diff_block code







|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
        """
        line_list = diff_block.splitlines()
        len_line_list = len(line_list)
        if len_line_list < 4 or len_line_list % 2 != 0:
            sys.stdout.write('ERROR: diff block not an even number of lines:\n')
            sys.stdout.write(diff_block)
            return
        num_line_pairs = (len_line_list - 2) // 2
        aln_first = 1
        eln_first = 2 + num_line_pairs
        for num in range(num_line_pairs):
            aln = aln_first + num
            eln = eln_first + num
            write_significant_line_diff(line_list[aln], line_list[eln])
    # end of process_diff_block code