astropy/astropy — pull request #3097 by zblz (2014-11-12 16:42:25+00:00)
Title: quantity: remove space if unitless quantity

For quantities without unit (e.g., those resulting from a division of two quantities with the same unit), the space between the value and the (empty) unit still appears when calling `__format__`. Example:

```python
>>> q1 = Quantity(3.14)
>>> format(q1, '.2f')
'3.14 '
```

This PR removes the space and adds a test for the example above to return '3.14'.