From f7432acd5d30f9daed6637b6cb41766ffb5460c1 Mon Sep 17 00:00:00 2001 From: Yonatan Most Date: Mon, 22 Jul 2019 17:44:24 +0300 Subject: [PATCH] Add unit test and run configuration --- .idea/runConfigurations/Run_tests.xml | 18 ++++++++++++++++++ test/__init__.py | 0 test/test_query.py | 9 +++++++++ ut.py | 4 ---- 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 .idea/runConfigurations/Run_tests.xml create mode 100644 test/__init__.py create mode 100644 test/test_query.py delete mode 100644 ut.py diff --git a/.idea/runConfigurations/Run_tests.xml b/.idea/runConfigurations/Run_tests.xml new file mode 100644 index 0000000..9180308 --- /dev/null +++ b/.idea/runConfigurations/Run_tests.xml @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_query.py b/test/test_query.py new file mode 100644 index 0000000..d579a4e --- /dev/null +++ b/test/test_query.py @@ -0,0 +1,9 @@ +from unittest import TestCase + +from column import columnGenerator as Col +from query import Query, Order, Nulls + + +class TestQuery(TestCase): + def test_where(self): + print(Query().where(Col.foo > 4).take(5).sort_by(Col.bar, Order.ASC, Nulls.LAST).compile_all()) diff --git a/ut.py b/ut.py deleted file mode 100644 index e09ab5d..0000000 --- a/ut.py +++ /dev/null @@ -1,4 +0,0 @@ -from column import columnGenerator as Col -from query import Query, Order, Nulls - -print(Query().where(Col.foo > 4).take(5).sort_by(Col.bar, Order.ASC, Nulls.LAST).compile_all())