|
12 | 12 | data_dir = os.path.join(dir, "data/synthetic_r_vs_gr")
|
13 | 13 |
|
14 | 14 | test_map = [
|
15 |
| - ([data_dir, "--xrange", "5,10"], "output_1", "Number of components: 10"), |
16 |
| - ([data_dir], "output_2", "Number of components: 10"), |
17 | 15 | (
|
18 |
| - [data_dir, "--xrange", "5,10", "12,15"], |
| 16 | + [data_dir, "--xrange", "5,10", "--threshold", "3"], |
| 17 | + "output_1", |
| 18 | + "Number of components: 3\n", |
| 19 | + ), |
| 20 | + ([data_dir, "--threshold", "3"], "output_2", "Number of components: 3\n"), |
| 21 | + ( |
| 22 | + [data_dir, "--xrange", "5,10", "12,15", "--threshold", "3"], |
19 | 23 | "output_3",
|
20 |
| - "Number of components: 10", |
| 24 | + "Number of components: 3\n", |
21 | 25 | ),
|
22 | 26 | ]
|
23 | 27 |
|
@@ -50,8 +54,7 @@ def test_nmf_mapping_code(tm, temp_dir, capsys):
|
50 | 54 | os.chdir(working_dir)
|
51 | 55 | main(args=data_dir)
|
52 | 56 | out, err = capsys.readouterr()
|
53 |
| - out_lines = out.splitlines() |
54 |
| - assert out_lines[2] == tm[2] |
| 57 | + assert out == tm[2] |
55 | 58 | results_dir = os.path.join(working_dir, "nmf_result")
|
56 | 59 | os.chdir(results_dir)
|
57 | 60 | expected_base = os.path.join(os.path.dirname(__file__), "output")
|
|
0 commit comments