From 737d9fe1e084e8b104edf3c1000abc18349c76dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Sun, 11 Feb 2024 23:12:02 -0800 Subject: [PATCH] Test mock sample --- tests/conftest.py | 9 +++++++++ tests/test_mock.py | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/test_mock.py diff --git a/tests/conftest.py b/tests/conftest.py index ab921dd..4e741cd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,6 +10,8 @@ import pytest +from too.mock import create_mock_too_catalogue + DBNAME: str = "sdss5db_too_test" @@ -25,3 +27,10 @@ def sdss5db(): yield sdss5db.database.close() + + +@pytest.fixture(scope="session") +def too_mock(): + sample = create_mock_too_catalogue() + + yield sample diff --git a/tests/test_mock.py b/tests/test_mock.py new file mode 100644 index 0000000..9e2863b --- /dev/null +++ b/tests/test_mock.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# @Author: José Sánchez-Gallego (gallegoj@uw.edu) +# @Date: 2024-02-11 +# @Filename: test_mock.py +# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) + +from __future__ import annotations + +import polars + + +def test_mock_sample(too_mock: polars.DataFrame): + assert isinstance(too_mock, polars.DataFrame) + assert too_mock.height > 500000