Skip to content

Commit

Permalink
do not test sleeping time of FakeModel
Browse files Browse the repository at this point in the history
  • Loading branch information
srcansiz committed Jun 28, 2023
1 parent 3345aa6 commit a39a66e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/test_round.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,17 @@ class FakeModule:
self.assertEqual(msg_test1.get('params_url', False), TestRound.URL_MSG)
self.assertEqual(msg_test1.get('command', False), 'train')

# This test is not relevant since it just tests SLEEPING_TIME added in FakeModel
# and it fails in macosx-m1
# timing test - does not always work with self.assertAlmostEqual
self.assertGreaterEqual(
msg_test1.get('timing', {'rtime_training': 0}).get('rtime_training'),
FakeModel.SLEEPING_TIME
)
self.assertLess(
msg_test1.get('timing', {'rtime_training': 0}).get('rtime_training'),
FakeModel.SLEEPING_TIME * 1.1
)
# self.assertGreaterEqual(
# msg_test1.get('timing', {'rtime_training': 0}).get('rtime_training'),
# FakeModel.SLEEPING_TIME
# )
# self.assertLess(
# msg_test1.get('timing', {'rtime_training': 0}).get('rtime_training'),
# FakeModel.SLEEPING_TIME * 1.1
# )

# test 2: redo test 1 but with the case where `model_kwargs` != None
FakeModel.SLEEPING_TIME = 0
Expand Down

0 comments on commit a39a66e

Please sign in to comment.