Skip to content

Commit

Permalink
Use \xspace instead of a space
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomsch authored Oct 17, 2023
1 parent 08fff86 commit b5da05e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions analysis/paper/median_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ def print_performance(decomposition_file):
file_rand_index_median = agg_results["file_rand_index.csv"]

print("% All the data used in the text is one file so that it can be easily updated.")
print("% Generated automatically")
print("% Generated automatically by median_performance.py in https://github.com/Thomsch/untangling-tools-benchmark")

print(f"\\newcommand\\numberOfBugs{{{bug_count} }}")
print(f"\\newcommand\\smartCommitMedian{{{smartcommit_median:.2f} }}")
print(f"\\newcommand\\flexemeMedian{{{flexeme_median:.2f} }}")
print(f"\\newcommand\\fileUntanglingMedian{{{file_rand_index_median:.2f} }}")
print(f"\\newcommand\\numberOfBugs{{{bug_count}\\xspace}}")
print(f"\\newcommand\\smartCommitMedian{{{smartcommit_median:.2f}\\xspace}}")
print(f"\\newcommand\\flexemeMedian{{{flexeme_median:.2f}\\xspace}}")
print(f"\\newcommand\\fileUntanglingMedian{{{file_rand_index_median:.2f}\\xspace}}")


def main():
Expand Down
10 changes: 5 additions & 5 deletions src/python/test/analysis/test_median_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def test_calculate_performance(sample_decompositions_csv, capfd):
captured = capfd.readouterr()
expected_output = (
"% All the data used in the text is one file so that it can be easily updated.\n"
"% Generated automatically\n"
"\\newcommand\\numberOfBugs{4 }\n"
"\\newcommand\\smartCommitMedian{0.75 }\n"
"\\newcommand\\flexemeMedian{0.65 }\n"
"\\newcommand\\fileUntanglingMedian{0.55 }\n"
"% Generated automatically by median_performance.py in https://github.com/Thomsch/untangling-tools-benchmark\n"
"\\newcommand\\numberOfBugs{4\\xspace}\n"
"\\newcommand\\smartCommitMedian{0.75\\xspace}\n"
"\\newcommand\\flexemeMedian{0.65\\xspace}\n"
"\\newcommand\\fileUntanglingMedian{0.55\\xspace}\n"
)
assert captured.out == expected_output

0 comments on commit b5da05e

Please sign in to comment.