diff --git a/integration_tests/utils_test.py b/integration_tests/utils_test.py index 3a8607b..16d16b4 100644 --- a/integration_tests/utils_test.py +++ b/integration_tests/utils_test.py @@ -1,4 +1,7 @@ import os +import logging + +import pandas as pd from integration_tests.bchain.getdata_test import temp_dir @@ -21,3 +24,10 @@ def test_clean_up(temp_dir): assert filenames[1].endswith('test_4.txt') +def test_logging_config(temp_dir): + assert len(os.listdir(temp_dir)) == 0 + + tfut.configure_logging(temp_dir, pd.datetime.utcnow()) + logging.getLogger().info('foobar') + + assert len(os.listdir(temp_dir)) == 1 diff --git a/tests/utils_test.py b/tests/utils_test.py new file mode 100644 index 0000000..0b9b956 --- /dev/null +++ b/tests/utils_test.py @@ -0,0 +1,8 @@ +from trufflepig.utils import progressbar + + +def test_progressbar(): + result = [] + for irun in range(100): + result.append(progressbar(irun, 100, percentage_step=1)) + assert all(result)