Skip to content

Feat/tests#91

Open
sivertjoe wants to merge 10 commits into
masterfrom
feat/tests
Open

Feat/tests#91
sivertjoe wants to merge 10 commits into
masterfrom
feat/tests

Conversation

@sivertjoe

@sivertjoe sivertjoe commented Dec 21, 2025

Copy link
Copy Markdown
Collaborator

I started on some tests. I want to add more tests before I make this a PR. You can add some tests too -- if you want.

Changes:

  • add integration tests
  • overhaul how the file / Runner works
  • fix setup

tests

Started on writing some tests. For now I made tests for:

  • token comand (get and set)
  • file system: test that it works with year folders including space, and day folders including spaces etc.
  • test for the overhaul: see below

file / Runner overhaul

For some context: I wanted to support a day where I had a main.rs file, as well as a main.py file. But currently, you can only have one. The current implementation picks the first it finds.

I changed this so support having multiple files, as well allowing other names than main (I.e. not_main.py is accepted) with the rules:

  • If only 1 "main" file is present, run that one
  • If more than 1 is present, the you need to add a --runner {ext} flag to the run command to resolve it.
  • For tally, you can only have 1 file per day.

Fix setup

I fixed the two issues:

  • .env folder should be inside the year folder.
  • the year 2025 should only have 12 days (not the standard 25)

@sivertjoe sivertjoe marked this pull request as ready for review December 23, 2025 15:20

@seblyng seblyng left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niiice🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants