Skip to content

test: add unit tests for core logic (platform, triggers, integrity, data dir) - #130

Closed
prashanth-kaki wants to merge 1 commit into
BusKill:masterfrom
prashanth-kaki:feat/add-unit-tests
Closed

test: add unit tests for core logic (platform, triggers, integrity, data dir)#130
prashanth-kaki wants to merge 1 commit into
BusKill:masterfrom
prashanth-kaki:feat/add-unit-tests

Conversation

@prashanth-kaki

Copy link
Copy Markdown

Adds the first unit test suite for BusKill core logic (issue #32).

34 tests covering:

  • Platform detection and OS_NAME_SHORT mapping
  • SUPPORTED_TRIGGERS list contents
  • set_trigger / get_trigger validation (valid, invalid, None, overwrite)
  • integrity_is_ok SHA-256 verification (pass, tamper, empty, large file)
  • setupDataDir naming and cache dir placement
  • Documentation URL attributes
  • getstate pickle safety
  • is_armed initial state

Tests run without USB hardware or a physical BusKill cable.
Includes a log handler fix for pytest compatibility.

Fixes #32

@github-actions

Copy link
Copy Markdown

INFO: No unicode characters found in PR's commits

(source)

@maltfield

Copy link
Copy Markdown
Member

Thanks for the PR :)

Please note that this repo does not accept contributions that use AI

Can you please tell us if you wrote this code, comments, and PR contents entirely by yourself? Or if you used AI for any part of it?

@prashanth-kaki

Copy link
Copy Markdown
Author

Hi, thanks for reviewing. I used Claude to help scaffold the initial test structure. I understand if that doesn't meet your contribution policy. Happy to rewrite the tests manually if you'd like to give me the opportunity.

@maltfield

maltfield commented Jun 15, 2026

Copy link
Copy Markdown
Member

thanks for your honesty. If you'd still like to contribute, please create a new PR that does not use AI at all (eg code, comments, pr content, etc)

also note that any PRs need to be made against or dev branch, not master

@maltfield maltfield closed this Jun 15, 2026
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.

Automated Unit Tests on all platforms

2 participants