Skip to content

Commit

Permalink
Use Nette Tester console-lines output and fixed Python's bench.
Browse files Browse the repository at this point in the history
  • Loading branch information
smuuf committed Dec 20, 2024
1 parent cde5385 commit 3eafc65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion bin/tests-unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,11 @@ fi
header "Primi: Unit tests"
info "Using interpreter: "$(which $INTERPRETER)

./../vendor/nette/tester/src/tester -p $INTERPRETER $COV -C ../tests $@ # --coverage-exclude 'Compiled/PrimiParser.php'
./../vendor/nette/tester/src/tester \
-o console-lines \
-p $INTERPRETER \
$COV `# Maybe with coverage` \
-C `# Use system-wide php.ini` \
../tests \
$@ `# Extra args`
# --coverage-exclude 'Compiled/PrimiParser.php'
2 changes: 1 addition & 1 deletion tests/bench/perf_bench_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def bench_regex_matches():
"její čisté neurčenosti, neboť k určení již patří jedno nebo nějaké " + \
"jiné, ale na začátku ještě nemáme žádné jiné..."

regex = re.compile("^.*(zač).*(,)?.*?(\.)")
regex = re.compile(r"^.*(zač).*(,)?.*?(\.)")

result = 0
c = 0
Expand Down

0 comments on commit 3eafc65

Please sign in to comment.