Skip to content

Commit

Permalink
chore: unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
severinsimmler committed Jul 20, 2023
1 parent f20268a commit aed4a6e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from databank import QueryCollection
from databank.query import QueryCollection, is_valid_query_header


@pytest.fixture
Expand All @@ -18,3 +18,11 @@ def test_query_collection(queries: QueryCollection):

with pytest.raises(KeyError):
queries["invalid"]


def test_is_valid_query_header():
assert is_valid_query_header("/* @name foo */")
assert not is_valid_query_header("/* name: foo bar */")
assert not is_valid_query_header("/** @name foo **/")
assert not is_valid_query_header("/* @name foo bar */")
assert not is_valid_query_header("-- @name: foo")

0 comments on commit aed4a6e

Please sign in to comment.