Skip to content

Commit

Permalink
lbg1_i2 test entry point. #25
Browse files Browse the repository at this point in the history
  • Loading branch information
rallen10 committed Dec 13, 2024
1 parent 96c5bfb commit cc1d563
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
+ Explicit `pyyaml` dependency (I think this used to be a sub-dependency of astropy)
+ In-package `src/kspdg/scripts/` directory for holding command-line entry-point scripts (e.g. julia install, unit tests) so that full download/clone of kspdg is not needed for julia install and unit testing
+ `MANIFEST.in` to include tests in source distributions
+ Julia dependency entry point. Run with
```bash
kspdg-install-julia-deps
```
+ Serverless and in-game unit test entry points. Run with
```bash
kspdg-run-serverless-tests
kspdg-run-lbg1-i2-tests
```


### Changed

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ full = ["kspdg[testing,adv_bots]","build"]
[project.scripts]
kspdg-install-julia-deps = "kspdg.scripts.install_julia_deps:main"
kspdg-run-serverless-tests = "kspdg.scripts.run_tests:serverless_tests"
kspdg-run-lbg1-i2-tests = "kspdg.scripts.run_tests:lbg1_i2_tests"
8 changes: 7 additions & 1 deletion src/kspdg/scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
KSPDG_INSTALL_PATH = files('kspdg')

def serverless_tests():
"""Run the tests for your package."""
"""Run tests that do not require connection to krpc server; i.e. ksp does not need to be running."""
# test_path = os.path.join(os.path.dirname(__file__), "../../../tests/serverless_tests")
test_path = os.path.join(KSPDG_INSTALL_PATH, "../../tests/serverless_tests")
pytest.main([test_path])

def lbg1_i2_tests():
"""Run tests that do not require connection to krpc server; i.e. ksp does not need to be running."""
# test_path = os.path.join(os.path.dirname(__file__), "../../../tests/serverless_tests")
test_path = os.path.join(KSPDG_INSTALL_PATH, "../../tests/ksp_ingame_tests/test_lbg1_i2.py")
pytest.main([test_path])

0 comments on commit cc1d563

Please sign in to comment.