From 8b1803e1b824a688fd7d5b2aea598d6b45c858cc Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 24 Jun 2020 16:06:41 -0400 Subject: [PATCH] Correct bugs and assertions --- tests/test_utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index d06bcb4..7053f66 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -5,6 +5,7 @@ import numpy as np from translater import utils, timeit, settings from geomeppy.geom.polygons import Polygon3D +from datetime import datetime def test_rotate(config): @@ -15,15 +16,14 @@ def test_rotate(config): assert l2 == [2, 3, 1] - @timeit -def test_lcm(config): +def test_lcm(): # This function takes two integers and returns the L.C.M. x = 10 y = 50 lcm = utils.lcm(x, y) - assert lcm == 5 + assert lcm == 50 def test_float_round(config): @@ -50,7 +50,7 @@ def test_angle(config): def test_write_lines(config): # Delete file if exists, then write lines in it - path = settings.data_folder + path = os.path.join(settings.data_folder, "write_lines.txt") lines = ["Test to write lines in file", "2nd line", "end of document"] utils.write_lines(path, lines) @@ -62,4 +62,4 @@ def test_date_transform(config): date_str = "08:10" new_date = utils.date_transform(date_str) - assert new_date == "07:10" + assert new_date == datetime(1900, 1, 1, 7, 10)