Skip to content

Commit

Permalink
Be explicit about the Python version we're expecting in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erbridge committed Jan 7, 2025
1 parent 97d749f commit 8dac405
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkg/dockerfile/standard_generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func TestGenerateEmptyCPU(t *testing.T) {
conf, err := config.FromYAML([]byte(`
build:
gpu: false
python_version: "3.12"
predict: predict.py:Predictor
`))
require.NoError(t, err)
Expand Down Expand Up @@ -121,6 +122,7 @@ func TestGenerateEmptyGPU(t *testing.T) {
conf, err := config.FromYAML([]byte(`
build:
gpu: true
python_version: "3.12"
predict: predict.py:Predictor
`))
require.NoError(t, err)
Expand Down Expand Up @@ -155,6 +157,7 @@ func TestGenerateFullCPU(t *testing.T) {
conf, err := config.FromYAML([]byte(`
build:
gpu: false
python_version: "3.12"
system_packages:
- ffmpeg
- cowsay
Expand Down Expand Up @@ -209,6 +212,7 @@ func TestGenerateFullGPU(t *testing.T) {
conf, err := config.FromYAML([]byte(`
build:
gpu: true
python_version: "3.12"
system_packages:
- ffmpeg
- cowsay
Expand Down Expand Up @@ -264,6 +268,7 @@ func TestPreInstall(t *testing.T) {

conf, err := config.FromYAML([]byte(`
build:
python_version: "3.12"
system_packages:
- cowsay
pre_install:
Expand Down Expand Up @@ -303,6 +308,7 @@ func TestPythonRequirements(t *testing.T) {
require.NoError(t, err)
conf, err := config.FromYAML([]byte(`
build:
python_version: "3.12"
python_requirements: "my-requirements.txt"
`))
require.NoError(t, err)
Expand Down Expand Up @@ -349,6 +355,7 @@ func TestGenerateWithLargeModels(t *testing.T) {
conf, err := config.FromYAML([]byte(`
build:
gpu: true
python_version: "3.12"
system_packages:
- ffmpeg
- cowsay
Expand Down Expand Up @@ -454,6 +461,7 @@ func TestGenerateDockerfileWithoutSeparateWeights(t *testing.T) {
conf, err := config.FromYAML([]byte(`
build:
gpu: false
python_version: "3.12"
predict: predict.py:Predictor
`))
require.NoError(t, err)
Expand Down Expand Up @@ -487,6 +495,7 @@ func TestGenerateEmptyCPUWithCogBaseImage(t *testing.T) {
conf, err := config.FromYAML([]byte(`
build:
gpu: false
python_version: "3.12"
predict: predict.py:Predictor
`))
require.NoError(t, err)
Expand Down Expand Up @@ -516,10 +525,10 @@ func TestGeneratePythonCPUWithCogBaseImage(t *testing.T) {
conf, err := config.FromYAML([]byte(`
build:
gpu: false
python_version: "3.12"
system_packages:
- ffmpeg
- cowsay
python_version: "3.12"
python_packages:
- pandas==1.2.0.12
run:
Expand Down Expand Up @@ -624,6 +633,7 @@ func TestGenerateTorchWithStrippedModifiedVersion(t *testing.T) {
build:
gpu: true
cuda: "11.8"
python_version: "3.12"
system_packages:
- ffmpeg
- cowsay
Expand Down Expand Up @@ -675,6 +685,7 @@ func TestGenerateWithStrip(t *testing.T) {
build:
gpu: true
cuda: "11.8"
python_version: "3.12"
system_packages:
- ffmpeg
- cowsay
Expand Down Expand Up @@ -727,6 +738,7 @@ func TestGenerateDoesNotContainDangerousCFlags(t *testing.T) {
build:
gpu: true
cuda: "11.8"
python_version: "3.12"
system_packages:
- ffmpeg
- cowsay
Expand Down Expand Up @@ -758,6 +770,7 @@ func TestGenerateWithPrecompile(t *testing.T) {
build:
gpu: true
cuda: "11.8"
python_version: "3.12"
system_packages:
- ffmpeg
- cowsay
Expand Down

0 comments on commit 8dac405

Please sign in to comment.