Skip to content

test: separate manual e2e tests and add one-to-one unit test structure - #474

Open
0xWelt wants to merge 1 commit into
build/ty-configfrom
refactor/test-structure
Open

0xWelt wants to merge 1 commit into
build/ty-configfrom
refactor/test-structure

Conversation

@0xWelt

@0xWelt 0xWelt commented May 10, 2026

Copy link
Copy Markdown
Member

Changes

Test Structure

  • Move all manual e2e tests from testing/ops/ and testing/ui/*/e2e.py to testing/manual/
  • Update imports and sys.path for manual tests
  • Add norecursedirs = ['manual'] and --import-mode=importlib to pytest config

One-to-One Unit Tests

  • Create 108 test files mirroring the autowsgr source layout
  • Add missing __init__.py for namespace packages

Real Unit Tests for Core Modules

  • context/: build, equipment, expedition, fleet, game_context, resources, ship
  • scheduler/: launcher, scheduler
  • server/: main, schemas, serializers
  • infra/logger: 8 cases with mock
  • types.py: enum and model tests

Bug Fix

  • Fix save_image() creating a literal None/ directory when img_dir is None

Verification

  • pytest: 539 passed
  • pre-commit: all clean

@0xWelt
0xWelt changed the base branch from main to build/ty-config May 10, 2026 05:12
@codecov

codecov Bot commented May 10, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@0xWelt
0xWelt requested a review from huan-yp May 10, 2026 09:03
@0xWelt
0xWelt force-pushed the refactor/test-structure branch 4 times, most recently from ab38edc to ed89452 Compare May 10, 2026 09:23
@0xWelt
0xWelt force-pushed the refactor/test-structure branch 2 times, most recently from f859a28 to 42290d4 Compare May 10, 2026 09:34
@0xWelt
0xWelt force-pushed the refactor/test-structure branch from 42290d4 to 39583c3 Compare May 10, 2026 09:35
@0xWelt
0xWelt force-pushed the refactor/test-structure branch from 39583c3 to a55db74 Compare May 10, 2026 09:42
@0xWelt
0xWelt force-pushed the refactor/test-structure branch from a55db74 to 3d23371 Compare May 10, 2026 09:44
@0xWelt
0xWelt force-pushed the refactor/test-structure branch from 3d23371 to 28ffd13 Compare May 10, 2026 09:58
@0xWelt
0xWelt force-pushed the refactor/test-structure branch from 28ffd13 to 244c77f Compare May 24, 2026 04:38
@0xWelt
0xWelt force-pushed the refactor/test-structure branch from 244c77f to 34438ee Compare August 16, 2026 10:12
@0xWelt
0xWelt force-pushed the refactor/test-structure branch from 34438ee to e5ea129 Compare August 16, 2026 10:21
@0xWelt
0xWelt requested a review from yltx August 16, 2026 10:31
@0xWelt

0xWelt commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

Hi @yltx, I remember you handle the releases for this repo. This PR restructures the test suite into tests/manual (device e2e) + tests/unit (pytest), with one-to-one unit tests rebuilt against the latest main APIs. All 1976 unit tests pass and CI is green (lint + test). Could you please kindly review when you have a moment? Thanks!

CC @huan-yp

- Restructure testing/ into tests/manual (device e2e) + tests/unit (pytest)
- Add one-to-one unit tests for source modules based on latest main APIs
- Configure pytest testpaths=tests/unit
- Fix ty overrides paths and type annotations for the new layout
- All 1976 unit tests pass
@0xWelt
0xWelt force-pushed the refactor/test-structure branch from e5ea129 to cecedd1 Compare August 16, 2026 11:49
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.

1 participant