Exemple #1
0
 def test_decode(self):
     types, messages, records = \
         filtered_records(read_fit(join(self.test_dir, 'source/personal/2018-07-26-rec.fit')),
                          profile_path=self.profile_path)
     with self.assertTextMatch(join(self.test_dir, 'target/personal/TestFit.test_decode'),
                               filters=[HEX_ADDRESS]) as output:
         for _, _, record in records:
             print(record.into(tuple, filter=chain(no_names, append_units, no_bad_values, fix_degrees)),
                   file=output)
Exemple #2
0
 def test_timestamp_16(self):
     types, messages, records = \
         filtered_records(read_fit(join(self.test_dir, 'source/personal/[email protected]_24755630065.fit')),
                          profile_path=self.profile_path)
     with self.assertTextMatch(join(self.test_dir, 'target/personal/TestFit.test_timestamp_16'),
                               filters=[HEX_ADDRESS]) as output:
         for _, _, record in records:
             if record.name == 'monitoring':
                 print(record.into(tuple, filter=chain(no_names, append_units, no_bad_values, fix_degrees)),
                       file=output)