combine coverage res

This commit is contained in:
Florian Bezannier
2021-06-23 16:27:35 +02:00
parent a2e909d463
commit 70cd1fbf57
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -33,4 +33,4 @@ jobs:
run: |
echo Test
coverage run -m unittest || exit 1
[ -n "$CODACY_PROJECT_TOKEN" ] && coverage xml -o cobertura.xml && bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml
[ -n "$CODACY_PROJECT_TOKEN" ] && coverage combine && coverage xml -o cobertura.xml && bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml
+3 -2
View File
@@ -71,7 +71,8 @@ class TestUnit(unittest.TestCase):
myp.abrp.abrp_enable_vin.add(car.vin)
res = myp.get_vehicle_info(myp.vehicles_list[0].vin)
myp.abrp.call(car, 22.1)
libs.config.save_config()
libs.config.Config().myp = myp
libs.config.Config().save_config()
assert isinstance(get_temp(str(latitude), str(longitude), myp.weather_api), float)
def test_car_model(self):
@@ -94,7 +95,7 @@ class TestUnit(unittest.TestCase):
Ecomix.co2_signal_key = key
def_country = "FR"
Ecomix.get_data_from_co2_signal(latitude, longitude, def_country)
res = Ecomix.get_co2_from_signal_cache(datetime.now() - timedelta(minutes=5), datetime.now(), def_country)
res = Ecomix.get_co2_from_signal_cache(datetime.utcnow().replace(tzinfo=UTC) - timedelta(minutes=5), datetime.now(), def_country)
assert isinstance(res, float)
def test_charge_control(self):