Move unit tests to their own sub-dir in tests
This commit is contained in:
parent
62b414af3c
commit
d08d4cd325
35 changed files with 6 additions and 7 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -69,7 +69,6 @@ target/
|
|||
|
||||
#Big-o files
|
||||
*.data
|
||||
tests/images/out/
|
||||
|
||||
#IDE files
|
||||
.vscode/
|
||||
|
|
@ -89,8 +88,8 @@ openflexure_settings/
|
|||
/src/openflexure_microscope_server/static/
|
||||
|
||||
# Files created by test utilities
|
||||
/tests/utilities/*.pstats
|
||||
/tests/utilities/*.png
|
||||
/tests/unit_tests/utilities/*.pstats
|
||||
/tests/unit_tests/utilities/*.png
|
||||
|
||||
# Files created by simulator
|
||||
openflexure/
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ addopts = [
|
|||
|
||||
norecursedirs = [".git", "build", "node_modules"]
|
||||
pythonpath = ["."]
|
||||
testpaths = ["tests"]
|
||||
testpaths = ["tests/unit_tests"]
|
||||
|
||||
[tool.ruff.format]
|
||||
# Use native line endings for all files
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ def test_env():
|
|||
def test_autofocus(test_env):
|
||||
"""Test Fast Autofocus can run doesn't raise an exception."""
|
||||
# Adjust the time for stage is 100 microseconds rather than 1 microsecond.
|
||||
test_env.get_thing_by_name["stage"].step_time = 0.0001
|
||||
test_env.get_thing_by_name("stage").step_time = 0.0001
|
||||
autofocus = test_env.get_thing_client("autofocus")
|
||||
_ = autofocus.fast_autofocus()
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ import pytest
|
|||
from openflexure_microscope_server import server as ofm_server
|
||||
|
||||
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
REPO_ROOT = os.path.dirname(THIS_DIR)
|
||||
REPO_ROOT = os.path.dirname(os.path.dirname(THIS_DIR))
|
||||
FULL_CONFIG = os.path.join(REPO_ROOT, "ofm_config_full.json")
|
||||
SIM_CONFIG = os.path.join(REPO_ROOT, "ofm_config_simulation.json")
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ from openflexure_microscope_server import utilities
|
|||
|
||||
# Useful for really finding the repo dir when we mock where it is.
|
||||
THIS_DIR = os.path.dirname(__file__)
|
||||
TRUE_REPO_DIR = os.path.dirname(THIS_DIR)
|
||||
TRUE_REPO_DIR = os.path.dirname(os.path.dirname(THIS_DIR))
|
||||
|
||||
# For explicit version checking.
|
||||
VER_STRING = "3.0.0-alpha4"
|
||||
Loading…
Add table
Add a link
Reference in a new issue