Skip to content

Commit

Permalink
Reduce time of jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuchenia committed Oct 1, 2023
1 parent 0424b42 commit 8c8827c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 2021/19/beacon_scanner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from collections import Counter
from itertools import product, permutations, combinations

import pytest

# Parse input
def parse(data):
return [[tuple([int(x) for x in line.split(',')]) for line in scanner.splitlines()[1:]] for scanner in data.split("\n\n")]
Expand Down Expand Up @@ -77,5 +79,6 @@ def doCheck(filename):
def test_beacon_test():
assert doCheck("test.txt") == (79, 3621)

@pytest.mark.skip(reason="P2 took too long time")
def test_beacon_data():
assert doCheck("data.txt") == (396, 11828)
3 changes: 3 additions & 0 deletions 2021/25/sea_cucumber_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/local/bin/python3
from copy import deepcopy

import pytest

def ex1(filename):
data = open(filename, "r").read()
map = [list(line) for line in data.splitlines()]
Expand Down Expand Up @@ -36,5 +38,6 @@ def ex1(filename):
def test_game_of_live_test():
assert ex1("test.txt") == 58

@pytest.mark.skip(reason="P2 took too long time")
def test_game_of_live_data():
assert ex1("data.txt") == 563
3 changes: 3 additions & 0 deletions 2022/19/not_enough_minerals_CP_worst_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import re

import pytest
from cpmpy import intvar, Model, cpm_array

# I've removed intvar arrays and used typical 2d arrays (bots, resources)
Expand Down Expand Up @@ -84,11 +85,13 @@ def do_simulationp2(filename, limit) -> int:
def test_minerals_cpmpy_p1_example():
assert do_simulationp1("example.txt", limit=24) == 33

@pytest.mark.skip(reason="P2 took too long time")
def test_minerals_cpmpy_p1_data():
assert do_simulationp1("data.txt", limit=24) == 1144

def test_minerals_cpmpy_p2_example():
assert do_simulationp2("example.txt", limit=32) == 3472

@pytest.mark.skip(reason="P2 took too long time")
def test_minerals_cpmpy_p2_data():
assert do_simulationp2("data.txt", limit=32) == 19980

0 comments on commit 8c8827c

Please sign in to comment.