Skip to content

Commit

Permalink
CU-8694gzbn3: Remove more old / useless comments in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mart-r committed May 14, 2024
1 parent e6debce commit abd8d0b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tests/stats/test_kfold.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ def test_3_fold_identical_folds(self):
)

def test_metrics_3_fold(self):
# stats_simple = self.cat._print_stats(self.mct_export)
stats_simple = self.reg_stats
for name, old, new in zip(self._names, stats_simple, self.stats_copied):
if name == 'examples':
Expand All @@ -251,17 +250,10 @@ def test_metrics_3_fold(self):
if name in ("prec", "rec", "f1"):
# these should average to the same ??
all_keys = old.keys() | new.keys()
# nmo = [(cui, self.cat.cdb.cui2preferred_name.get(cui, cui)) for cui in new.keys() - old.keys()]
# omn = [(cui, self.cat.cdb.cui2preferred_name.get(cui, cui)) for cui in old.keys() - new.keys()]
for cui in all_keys:
cuiname = self.cat.cdb.cui2preferred_name.get(cui, cui)
with self.subTest(f"{name}-{cui} [{cuiname}]"):
self.assertIn(cui, old.keys(), f"CUI '{cui}' ({cuiname}) not in old")
self.assertIn(cui, new.keys(), f"CUI '{cui}' ({cuiname}) not in new")
v1, v2 = old[cui], new[cui]
self.assertEqual(v1, v2, f"Values not equal for {cui} ({self.cat.cdb.cui2preferred_name.get(cui, cui)})")
# self.assertEqual(old.keys(), new.keys(), f'keys not equal: [N-O] {nmo} and [O-N] {omn}')
# for k in old:
# v1, v2 = old[k], new[k]
# with self.subTest(f"{name}-{k}"):
# self.assertEqual(v1, v2)

0 comments on commit abd8d0b

Please sign in to comment.