refactor: rename test/ to tests/

This commit is contained in:
Konstantin Fickel 2026-02-15 17:30:44 +01:00
parent af2debc19b
commit f9ed0463f7
Signed by: kfickel
GPG key ID: A793722F9933C1A5
6 changed files with 16 additions and 17 deletions

View file

@ -1,6 +1,6 @@
from datetime import date, datetime, time
from streamer.localize.extract_datetime import (
from streamd.localize.extract_datetime import (
extract_date_from_marker,
extract_datetime_from_file_name,
extract_datetime_from_marker,

View file

@ -1,6 +1,5 @@
from faker import Faker
from streamer.parse import Shard, StreamFile, parse_markdown_file
from streamd.parse import Shard, StreamFile, parse_markdown_file
fake = Faker()

View file

@ -2,8 +2,8 @@ from __future__ import annotations
from datetime import datetime
from streamer.localize import LocalizedShard
from streamer.query.find import find_shard, find_shard_by_position
from streamd.localize import LocalizedShard
from streamd.query.find import find_shard, find_shard_by_position
def generate_localized_shard(

View file

@ -1,14 +1,14 @@
from datetime import datetime
from streamer.localize.localize import localize_stream_file
from streamer.localize.localized_shard import LocalizedShard
from streamer.localize.repository_configuration import (
from streamd.localize.localize import localize_stream_file
from streamd.localize.localized_shard import LocalizedShard
from streamd.localize.repository_configuration import (
Dimension,
Marker,
MarkerPlacement,
RepositoryConfiguration,
)
from streamer.parse.shard import Shard, StreamFile
from streamd.parse.shard import Shard, StreamFile
repository_configuration = RepositoryConfiguration(
dimensions={
@ -29,8 +29,8 @@ repository_configuration = RepositoryConfiguration(
),
},
markers={
"Streamer": Marker(
display_name="Streamer",
"Streamd": Marker(
display_name="Streamd",
placements=[
MarkerPlacement(dimension="project"),
MarkerPlacement(
@ -49,39 +49,39 @@ class TestLocalize:
def test_project_simple_stream_file(self):
stream_file = StreamFile(
file_name="20250622-121000 Test File.md",
shard=Shard(start_line=1, end_line=1, markers=["Streamer"]),
shard=Shard(start_line=1, end_line=1, markers=["Streamd"]),
)
assert localize_stream_file(
stream_file, repository_configuration
) == LocalizedShard(
moment=datetime(2025, 6, 22, 12, 10, 0, 0),
markers=["Streamer"],
markers=["Streamd"],
tags=[],
start_line=1,
end_line=1,
children=[],
location={"project": "Streamer", "file": stream_file.file_name},
location={"project": "Streamd", "file": stream_file.file_name},
)
def test_timesheet_use_case(self):
stream_file = StreamFile(
file_name="20260131-210000 Test File.md",
shard=Shard(start_line=1, end_line=1, markers=["Timesheet", "Streamer"]),
shard=Shard(start_line=1, end_line=1, markers=["Timesheet", "Streamd"]),
)
assert localize_stream_file(
stream_file, repository_configuration
) == LocalizedShard(
moment=datetime(2026, 1, 31, 21, 0, 0, 0),
markers=["Timesheet", "Streamer"],
markers=["Timesheet", "Streamd"],
tags=[],
start_line=1,
end_line=1,
children=[],
location={
"file": stream_file.file_name,
"project": "Streamer",
"project": "Streamd",
"timesheet": "coding",
},
)