Changeset c9991fed in OpenWorkouts-current


Ignore:
Timestamp:
Feb 8, 2019, 1:15:43 PM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
55470f9
Parents:
20782ac
Message:

Workout.rounded_distance() returns distance rounded with 2 decimals now

Location:
ow
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ow/models/workout.py

    r20782ac rc9991fed  
    138138        """
    139139        if self.distance:
    140             return round(self.distance, 1)
     140            return round(self.distance, 2)
    141141        return '-'
    142142
  • ow/tests/models/test_workout.py

    r20782ac rc9991fed  
    138138        workout = Workout()
    139139        workout.distance = 44.44444444
    140         assert workout.rounded_distance == 44.4
     140        assert workout.rounded_distance == 44.44
    141141
    142142    def test_has_hr(self):
Note: See TracChangeset for help on using the changeset viewer.