From 3f9f918c93a92350c76a761af85abf003737fc30 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 29 Feb 2020 09:24:00 +0100 Subject: Fix function approx and its testcase Function was moved and changed by commit 0f8643954fd9507aec85bab46046e71a497bfffe, but the testcase was not. --- lulua/test_stats.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'lulua/test_stats.py') diff --git a/lulua/test_stats.py b/lulua/test_stats.py index 3259bcd..48c4b0d 100644 --- a/lulua/test_stats.py +++ b/lulua/test_stats.py @@ -21,7 +21,7 @@ import operator import pytest -from .stats import updateDictOp, approx, SimpleStats, TriadStats, allStats +from .stats import updateDictOp, SimpleStats, TriadStats, allStats from .keyboard import defaultKeyboards from .layout import defaultLayouts, ButtonCombination from .writer import Writer, SkipEvent @@ -40,19 +40,6 @@ def test_updateDictOp (): assert a == {'foo': {1: 3+7}} assert b == {'foo': {1: 7}} -def test_approx (): - assert approx (0) == (0, 0, '') - assert approx (0.01) == (0, 0, '') - assert approx (0.05) == (0, 1, '') - assert approx (1) == (1, 0, '') - assert approx (100) == (100, 0, '') - assert approx (999.9) == (999, 9, '') - - assert approx (10**3) == (1, 0, 'thousand') - assert approx (10**6) == (1, 0, 'million') - assert approx (10**9) == (1, 0, 'billion') - assert approx (10**12) == (1000, 0, 'billion') - @pytest.fixture def writer (): """ Return a default, safe writer with known properties for a fixed layout """ -- cgit v1.2.3