From b49bad6db239026d6a7f41d9ea0c317a0d170859 Mon Sep 17 00:00:00 2001 From: Vasilije <8619304+Vasilije1990@users.noreply.github.com> Date: Sat, 25 May 2024 13:51:38 +0200 Subject: [PATCH] Updates and fixes for the lib --- .github/workflows/test_common.yml | 4 ++++ pytest.ini | 2 ++ tests/import_test.py | 7 +++++++ 3 files changed, 13 insertions(+) create mode 100644 pytest.ini create mode 100644 tests/import_test.py diff --git a/.github/workflows/test_common.yml b/.github/workflows/test_common.yml index ea6117d79..412c65b6c 100644 --- a/.github/workflows/test_common.yml +++ b/.github/workflows/test_common.yml @@ -72,6 +72,10 @@ jobs: - name: Install dependencies run: poetry install --no-interaction + + - name: Run tests + run: poetry run pytest tests/ + # - name: Build with Poetry # run: poetry build # diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 000000000..f1c52b6fe --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +addopts = tests/ \ No newline at end of file diff --git a/tests/import_test.py b/tests/import_test.py new file mode 100644 index 000000000..bcd6f7fad --- /dev/null +++ b/tests/import_test.py @@ -0,0 +1,7 @@ + +def test_import_cognee(): + try: + import cognee + assert True # Pass the test if no error occurs + except ImportError as e: + assert False, f"Failed to import cognee: {e}" \ No newline at end of file