Skip to content

Commit 6f3a680

Browse files
committed
Make test.sh run full comparison test file for base/new modes
1 parent a2e48cb commit 6f3a680

2 files changed

Lines changed: 17 additions & 26 deletions

File tree

Dockerfile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@ FROM public.ecr.aws/d3j8x8q7/olympus-base-python:latest
22

33
WORKDIR /app
44

5-
# Copy poetry metadata first for potential layer caching
6-
COPY pyproject.toml poetry.lock ./
7-
8-
# Install project dependencies using Poetry (assumes Poetry exists in base image).
9-
# Do NOT install Poetry manually.
10-
RUN poetry config virtualenvs.in-project false \
11-
&& poetry install --no-root -v
12-
13-
# Copy the full repository into the image
5+
# Copy repository into the image before installing
146
COPY . .
157

16-
# Install the local package in editable mode so tests can import it
17-
RUN poetry run pip install -e .
8+
# Use pip to install in editable mode with test extras to avoid Poetry issues
9+
RUN python -m pip install --upgrade pip
10+
RUN python -m pip install -e ".[test]"
1811

19-
# Do not run tests in the image build; open a shell by default
2012
CMD ["/bin/bash"]

test.sh

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
#!/bin/sh
2-
# POSIX shell script for Olympus test runner.
3-
# Usage:
4-
# ./test.sh base
5-
# ./test.sh new
6-
# This script runs only the regression test and does not install packages.
72
set -eu
83

94
if [ "$#" -ne 1 ]; then
10-
printf 'Usage: %s [base|new]\n' "$0" >&2
11-
exit 2
5+
echo "Usage: $0 {base|new}"
6+
exit 1
127
fi
138

149
case "$1" in
15-
base|new)
10+
base)
11+
# Run the comparison file but exclude the new regression test that
12+
# doesn't exist in the base commit.
13+
poetry run pytest -q tests/datetime/test_comparison.py -k "not less_than_with_fold"
1614
;;
17-
*)
18-
printf 'Invalid argument: %s\n' "$1" >&2
19-
printf 'Usage: %s [base|new]\n' "$0" >&2
20-
exit 2
15+
new)
16+
# Run the full file including the new regression test.
17+
poetry run pytest -q tests/datetime/test_comparison.py
18+
;;
19+
*)
20+
echo "Usage: $0 {base|new}"
21+
exit 1
2122
;;
2223
esac
2324

24-
poetry run pytest -q tests/datetime/test_comparison.py::test_less_than_with_fold
25-
exit $?

0 commit comments

Comments
 (0)