Skip to content

Commit

Permalink
Test mock sample
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Feb 12, 2024
1 parent b1d78db commit 737d9fe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import pytest

from too.mock import create_mock_too_catalogue


DBNAME: str = "sdss5db_too_test"

Expand All @@ -25,3 +27,10 @@ def sdss5db():
yield

sdss5db.database.close()


@pytest.fixture(scope="session")
def too_mock():
sample = create_mock_too_catalogue()

yield sample
16 changes: 16 additions & 0 deletions tests/test_mock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: José Sánchez-Gallego ([email protected])
# @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

0 comments on commit 737d9fe

Please sign in to comment.