test_.py 367 B

1234567891011121314151617
  1. # -*- coding: utf-8 -*-
  2. import pytest
  3. import datetime
  4. import dingguo
  5. import yaml
  6. import os
  7. def test_sum_init_eur():
  8. assert dingguo.Sum(1.23, u'EUR') == dingguo.Sum(1.23, u'€')
  9. def test_sum_init_usd():
  10. assert dingguo.Sum(1.23, u'USD') == dingguo.Sum(1.23, u'US$')
  11. def test_distance_metres():
  12. assert int(dingguo.Distance(1.23, u'km').metres) == 1230