Пример #1
0
def test_oce_rlcs(benchmark):
    replay_path = get_replay_path("OCE_RLCS_7_CARS.replay")

    benchmark.pedantic(analyze_replay_file,
                       kwargs={"replay_path": replay_path},
                       rounds=10,
                       iterations=3)
Пример #2
0
def test_full_rumble(benchmark):
    replay_path = get_replay_path("RUMBLE_FULL.replay")

    benchmark.pedantic(analyze_replay_file,
                       kwargs={"replay_path": replay_path},
                       rounds=10,
                       iterations=3)
Пример #3
0
def test_short_dropshot(benchmark):
    replay_path = get_replay_path("DROPSHOT_PHASE2_BALL.replay")

    benchmark.pedantic(analyze_replay_file,
                       kwargs={"replay_path": replay_path},
                       rounds=10,
                       iterations=3)
Пример #4
0
def test_short_sample(benchmark):
    replay_path = get_replay_path("SHORT_SAMPLE.replay")

    benchmark.pedantic(analyze_replay_file,
                       kwargs={"replay_path": replay_path},
                       rounds=10,
                       iterations=3)
Пример #5
0
def test_intensive_oce_rlcs(benchmark):
    replay_path = get_replay_path("OCE_RLCS_7_CARS.replay")

    benchmark.pedantic(analyze_replay_file,
                       kwargs={
                           "replay_path": replay_path,
                           "calculate_intensive_events": True
                       },
                       rounds=5,
                       iterations=1)
Пример #6
0
 def test_command_line_valid_input(self):
     replay_path = get_replay_path(get_raw_replays()["KICKOFF_NO_TOUCH"][0])
     main(program_args=["--i", replay_path, "-v", "--dry-run"])
Пример #7
0
 def test_command_line_no_output(self):
     replay_path = get_replay_path(get_raw_replays()["KICKOFF_NO_TOUCH"][0])
     with pytest.raises(SystemExit):
         main(program_args=["--i", replay_path])
Пример #8
0
 def test_command_line_invalid_input(self):
     replay_path = get_replay_path("INVALID_REPLAY")
     with pytest.raises(FileNotFoundError):
         main(program_args=[
             "--i", replay_path, "-s", "--proto", "PATH_DOESNT_MATTER"
         ])
Пример #9
0
 def test_command_line_invalid_input(self):
     replay_path = get_replay_path("INVALID_REPLAY")
     with pytest.raises(RattleTrapException):
         main(program_args=[
             "--i", replay_path, "-s", "--proto", "PATH_DOESNT_MATTER"
         ])