Skip to content

Commit 4ecded1

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

2 files changed

Lines changed: 18 additions & 27 deletions

File tree

Dockerfile

Lines changed: 5 additions & 13 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 ./
5+
# Copy the full repository before installing to ensure Poetry sees pyproject.toml
6+
COPY . /app
77

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
8+
# Use Poetry from the base image and install dependencies into the image
9+
RUN poetry config virtualenvs.create false
10+
RUN poetry install --no-interaction --no-root
1211

13-
# Copy the full repository into the image
14-
COPY . .
15-
16-
# Install the local package in editable mode so tests can import it
17-
RUN poetry run pip install -e .
18-
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)