Toter Code und Funktionen entfernt
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
Test für die check_rack_z_coordinates Funktion
|
||||
"""
|
||||
|
||||
import configparser
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
@@ -13,6 +14,14 @@ sys.path.insert(0, str(Path(__file__).parent))
|
||||
from getpositions import check_rack_z_coordinates
|
||||
from error_collector import ErrorCollector
|
||||
|
||||
|
||||
def _make_config(max_height_diff=2000.0):
|
||||
"""Erzeugt ein minimales Config-Objekt für die Tests."""
|
||||
config = configparser.ConfigParser()
|
||||
config.add_section("Racks")
|
||||
config.set("Racks", "MaximalTotalHeightDifferences", str(max_height_diff))
|
||||
return config
|
||||
|
||||
def test_no_deviation():
|
||||
"""Test mit Racks ohne starke Abweichung (< 2000mm)"""
|
||||
print("Test 1: Keine starke Abweichung (< 2000mm)")
|
||||
@@ -24,7 +33,7 @@ def test_no_deviation():
|
||||
}
|
||||
|
||||
error_collector = ErrorCollector()
|
||||
check_rack_z_coordinates(racks, error_collector)
|
||||
check_rack_z_coordinates(racks, error_collector, _make_config())
|
||||
|
||||
warnings = error_collector.warnings
|
||||
if warnings:
|
||||
@@ -44,7 +53,7 @@ def test_with_deviation():
|
||||
}
|
||||
|
||||
error_collector = ErrorCollector()
|
||||
check_rack_z_coordinates(racks, error_collector)
|
||||
check_rack_z_coordinates(racks, error_collector, _make_config())
|
||||
|
||||
warnings = error_collector.warnings
|
||||
if warnings:
|
||||
@@ -63,7 +72,7 @@ def test_exactly_2000mm():
|
||||
}
|
||||
|
||||
error_collector = ErrorCollector()
|
||||
check_rack_z_coordinates(racks, error_collector)
|
||||
check_rack_z_coordinates(racks, error_collector, _make_config())
|
||||
|
||||
warnings = error_collector.warnings
|
||||
if warnings:
|
||||
@@ -82,7 +91,7 @@ def test_dict_format():
|
||||
}
|
||||
|
||||
error_collector = ErrorCollector()
|
||||
check_rack_z_coordinates(racks, error_collector)
|
||||
check_rack_z_coordinates(racks, error_collector, _make_config())
|
||||
|
||||
warnings = error_collector.warnings
|
||||
if warnings:
|
||||
|
||||
Reference in New Issue
Block a user