2022-02-23
This commit is contained in:
parent
35a0c40d14
commit
dc68cce9ed
80 changed files with 859345 additions and 4387 deletions
289
tests/data/ships/base.json
Normal file
289
tests/data/ships/base.json
Normal file
|
@ -0,0 +1,289 @@
|
|||
{
|
||||
"timestamp": "2019-09-25T21:29:51Z",
|
||||
"event": "Loadout",
|
||||
"Ship": "asp",
|
||||
"ShipID": 0,
|
||||
"ShipName": "Nightmaregreen_N",
|
||||
"ShipIdent": "NMGR_N",
|
||||
"HullValue": 6144793,
|
||||
"ModulesValue": 33042643,
|
||||
"HullHealth": 1.000000,
|
||||
"UnladenMass": 347.200012,
|
||||
"CargoCapacity": 0,
|
||||
"MaxJumpRange": 56.372398,
|
||||
"FuelCapacity": {
|
||||
"Main": 64.000000,
|
||||
"Reserve": 0.630000
|
||||
},
|
||||
"Rebuy": 1959374,
|
||||
"Modules": [
|
||||
{
|
||||
"Slot": "ShipCockpit",
|
||||
"Item": "asp_cockpit",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "CargoHatch",
|
||||
"Item": "modularcargobaydoor",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "TinyHardpoint1",
|
||||
"Item": "hpt_heatsinklauncher_turret_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"AmmoInClip": 1,
|
||||
"AmmoInHopper": 2,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "TinyHardpoint2",
|
||||
"Item": "hpt_heatsinklauncher_turret_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"AmmoInClip": 1,
|
||||
"AmmoInHopper": 2,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "TinyHardpoint3",
|
||||
"Item": "hpt_heatsinklauncher_turret_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"AmmoInClip": 1,
|
||||
"AmmoInHopper": 2,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "TinyHardpoint4",
|
||||
"Item": "hpt_heatsinklauncher_turret_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"AmmoInClip": 1,
|
||||
"AmmoInHopper": 2,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "PaintJob",
|
||||
"Item": "paintjob_asp_operator_red",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Armour",
|
||||
"Item": "asp_armour_grade1",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "PowerPlant",
|
||||
"Item": "int_powerplant_size5_class2",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "MainEngines",
|
||||
"Item": "int_engine_size4_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "FrameShiftDrive",
|
||||
"Item": "int_hyperdrive_size5_class5",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000,
|
||||
"Engineering": {
|
||||
"Engineer": "Felicity Farseer",
|
||||
"EngineerID": 300100,
|
||||
"BlueprintID": 128673694,
|
||||
"BlueprintName": "FSD_LongRange",
|
||||
"Level": 5,
|
||||
"Quality": 1.000000,
|
||||
"ExperimentalEffect": "special_fsd_heavy",
|
||||
"ExperimentalEffect_Localised": "Mass Manager",
|
||||
"Modifiers": [
|
||||
{
|
||||
"Label": "Mass",
|
||||
"Value": 26.000000,
|
||||
"OriginalValue": 20.000000,
|
||||
"LessIsGood": 1
|
||||
},
|
||||
{
|
||||
"Label": "Integrity",
|
||||
"Value": 93.840004,
|
||||
"OriginalValue": 120.000000,
|
||||
"LessIsGood": 0
|
||||
},
|
||||
{
|
||||
"Label": "PowerDraw",
|
||||
"Value": 0.690000,
|
||||
"OriginalValue": 0.600000,
|
||||
"LessIsGood": 1
|
||||
},
|
||||
{
|
||||
"Label": "FSDOptimalMass",
|
||||
"Value": 1692.599976,
|
||||
"OriginalValue": 1050.000000,
|
||||
"LessIsGood": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"Slot": "LifeSupport",
|
||||
"Item": "int_lifesupport_size4_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "PowerDistributor",
|
||||
"Item": "int_powerdistributor_size4_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Radar",
|
||||
"Item": "int_sensors_size5_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "FuelTank",
|
||||
"Item": "int_fueltank_size5_class3",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Decal1",
|
||||
"Item": "decal_explorer_starblazer",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Decal2",
|
||||
"Item": "decal_explorer_starblazer",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Decal3",
|
||||
"Item": "decal_explorer_starblazer",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "ShipName0",
|
||||
"Item": "nameplate_shipname_white",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "ShipName1",
|
||||
"Item": "nameplate_shipname_white",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "ShipID0",
|
||||
"Item": "nameplate_shipid_white",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "ShipID1",
|
||||
"Item": "nameplate_shipid_white",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Slot01_Size6",
|
||||
"Item": "int_fuelscoop_size6_class5",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Slot02_Size5",
|
||||
"Item": "int_fueltank_size5_class3",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Slot03_Size3",
|
||||
"Item": "int_repairer_size3_class5",
|
||||
"On": false,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Slot04_Size3",
|
||||
"Item": "int_shieldgenerator_size3_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Slot05_Size3",
|
||||
"Item": "int_buggybay_size2_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Slot06_Size2",
|
||||
"Item": "int_detailedsurfacescanner_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Slot07_Size2",
|
||||
"Item": "int_dockingcomputer_standard",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "Slot08_Size1",
|
||||
"Item": "int_supercruiseassist",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "PlanetaryApproachSuite",
|
||||
"Item": "int_planetapproachsuite",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
},
|
||||
{
|
||||
"Slot": "VesselVoice",
|
||||
"Item": "voicepack_eden",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Health": 1.000000
|
||||
}
|
||||
]
|
||||
}
|
193
tests/data/ships/guardian.json
Normal file
193
tests/data/ships/guardian.json
Normal file
|
@ -0,0 +1,193 @@
|
|||
{
|
||||
"timestamp": "2019-09-25T21:29:51Z",
|
||||
"event": "Loadout",
|
||||
"Ship": "asp",
|
||||
"ShipName": "Nightmaregreen_G",
|
||||
"ShipIdent": "NMGR_G",
|
||||
"HullValue": 6144793,
|
||||
"ModulesValue": 33181682,
|
||||
"UnladenMass": 348.500061,
|
||||
"CargoCapacity": 0,
|
||||
"MaxJumpRange": 60.164637,
|
||||
"FuelCapacity": {
|
||||
"Main": 64,
|
||||
"Reserve": 0.63
|
||||
},
|
||||
"Rebuy": 1966323,
|
||||
"Modules": [
|
||||
{
|
||||
"Slot": "CargoHatch",
|
||||
"Item": "modularcargobaydoor",
|
||||
"On": true,
|
||||
"Priority": 0
|
||||
},
|
||||
{
|
||||
"Slot": "TinyHardpoint1",
|
||||
"Item": "hpt_heatsinklauncher_turret_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 3071
|
||||
},
|
||||
{
|
||||
"Slot": "TinyHardpoint2",
|
||||
"Item": "hpt_heatsinklauncher_turret_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 3071
|
||||
},
|
||||
{
|
||||
"Slot": "TinyHardpoint3",
|
||||
"Item": "hpt_heatsinklauncher_turret_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 3071
|
||||
},
|
||||
{
|
||||
"Slot": "TinyHardpoint4",
|
||||
"Item": "hpt_heatsinklauncher_turret_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 3071
|
||||
},
|
||||
{
|
||||
"Slot": "Armour",
|
||||
"Item": "asp_armour_grade1",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Value": 0
|
||||
},
|
||||
{
|
||||
"Slot": "PowerPlant",
|
||||
"Item": "int_powerplant_size5_class2",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Value": 140523
|
||||
},
|
||||
{
|
||||
"Slot": "MainEngines",
|
||||
"Item": "int_engine_size4_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 52325
|
||||
},
|
||||
{
|
||||
"Slot": "FrameShiftDrive",
|
||||
"Item": "int_hyperdrive_size5_class5",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 4478716,
|
||||
"Engineering": {
|
||||
"BlueprintName": "FSD_LongRange",
|
||||
"Level": 5,
|
||||
"Quality": 1,
|
||||
"ExperimentalEffect": "special_fsd_heavy",
|
||||
"Modifiers": [
|
||||
{
|
||||
"Label": "Mass",
|
||||
"Value": 26.000061,
|
||||
"OriginalValue": 20
|
||||
},
|
||||
{
|
||||
"Label": "Integrity",
|
||||
"Value": 93.839832,
|
||||
"OriginalValue": 120
|
||||
},
|
||||
{
|
||||
"Label": "PowerDraw",
|
||||
"Value": 0.690001,
|
||||
"OriginalValue": 0.6
|
||||
},
|
||||
{
|
||||
"Label": "FSDOptimalMass",
|
||||
"Value": 1692.58667,
|
||||
"OriginalValue": 1050
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"Slot": "LifeSupport",
|
||||
"Item": "int_lifesupport_size4_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 24895
|
||||
},
|
||||
{
|
||||
"Slot": "PowerDistributor",
|
||||
"Item": "int_powerdistributor_size4_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 24895
|
||||
},
|
||||
{
|
||||
"Slot": "Radar",
|
||||
"Item": "int_sensors_size5_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 69709
|
||||
},
|
||||
{
|
||||
"Slot": "FuelTank",
|
||||
"Item": "int_fueltank_size5_class3",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Value": 85776
|
||||
},
|
||||
{
|
||||
"Slot": "Slot01_Size6",
|
||||
"Item": "int_fuelscoop_size6_class5",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 25240068
|
||||
},
|
||||
{
|
||||
"Slot": "Slot02_Size5",
|
||||
"Item": "int_fueltank_size5_class3",
|
||||
"On": true,
|
||||
"Priority": 1,
|
||||
"Value": 85776
|
||||
},
|
||||
{
|
||||
"Slot": "Slot03_Size3",
|
||||
"Item": "int_repairer_size3_class5",
|
||||
"On": false,
|
||||
"Priority": 0,
|
||||
"Value": 2302911
|
||||
},
|
||||
{
|
||||
"Slot": "Slot04_Size3",
|
||||
"Item": "int_shieldgenerator_size3_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 16506
|
||||
},
|
||||
{
|
||||
"Slot": "Slot05_Size3",
|
||||
"Item": "int_buggybay_size2_class2",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 18954
|
||||
},
|
||||
{
|
||||
"Slot": "Slot06_Size2",
|
||||
"Item": "int_detailedsurfacescanner_tiny",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 219375
|
||||
},
|
||||
{
|
||||
"Slot": "Slot07_Size2",
|
||||
"Item": "int_dockingcomputer_standard",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 3949
|
||||
},
|
||||
{
|
||||
"Slot": "Slot08_Size1",
|
||||
"Item": "int_guardianfsdbooster_size1",
|
||||
"On": true,
|
||||
"Priority": 0,
|
||||
"Value": 405020
|
||||
}
|
||||
]
|
||||
}
|
|
@ -79,18 +79,18 @@ class Test_PyRouter(object): # noqa: H601
|
|||
err = "Failed to resolve {}".format(name)
|
||||
assert name in resolved_systems, err
|
||||
|
||||
@pytest.mark.dependency(depends=["Test_ED_LRR::test_load_and_resolve"])
|
||||
@pytest.mark.dependency(depends=["Test_PyRouter::test_load_and_resolve"])
|
||||
@flaky(max_runs=10, min_passes=5)
|
||||
@pytest.mark.parametrize(
|
||||
"greedyness", greedyness, ids=lambda v: "greedyness:{}".format(v)
|
||||
)
|
||||
@flaky(max_runs=10, min_passes=5)
|
||||
def test_zero_range_fails(self, py_router, greedyness):
|
||||
r, resolved_systems = py_router
|
||||
waypoints = random.sample(list(resolved_systems.values()), k=2)
|
||||
err = pytest.raises(RuntimeError, r.route, waypoints, 0, greedyness)
|
||||
err.match(r"No route from .* to .* found!")
|
||||
|
||||
@pytest.mark.dependency(depends=["Test_ED_LRR::test_load_and_resolve"])
|
||||
@pytest.mark.dependency(depends=["Test_PyRouter::test_load_and_resolve"])
|
||||
@flaky(max_runs=10, min_passes=2)
|
||||
@pytest.mark.parametrize("workers", n_workers, ids=idf("workers"))
|
||||
@pytest.mark.parametrize("jump_range", ranges, ids=idf("range"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue