Skip to content

Commit da652f3

Browse files
ndon55555kardolus
andcommitted
Fix unit tests
Co-authored-by: Guillermo Kardolus <[email protected]>
1 parent a8ee55f commit da652f3

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/python/supply/supply.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,8 @@ func (s *Supplier) RunPipVendored() error {
638638
}
639639

640640
if hasBuildOptions() {
641-
s.Log.Info("Using the pip no build isolation flag")
641+
s.Log.Info("Using the pip --no-build-isolation flag since it is available")
642642
installArgs = append(installArgs, "--no-build-isolation")
643-
} else {
644-
s.Log.Info("Using the build isolation flag")
645643
}
646644

647645
// Remove lines from requirements.txt that begin with -i

src/python/supply/supply_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ cffi==0.9.2
540540
})
541541

542542
It("installs the vendor directory", func() {
543-
mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "-r", filepath.Join(buildDir, "requirements.txt"), "--ignore-installed", "--exists-action=w", fmt.Sprintf("--src=%s/src", depDir), "--no-index", "--no-build-isolation", fmt.Sprintf("--find-links=file://%s/vendor", buildDir))
543+
mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "-r", filepath.Join(buildDir, "requirements.txt"), "--ignore-installed", "--exists-action=w", fmt.Sprintf("--src=%s/src", depDir), "--no-index", fmt.Sprintf("--find-links=file://%s/vendor", buildDir), "--no-build-isolation")
544544
Expect(supplier.RunPipVendored()).To(Succeed())
545545
})
546546
})
@@ -549,7 +549,7 @@ cffi==0.9.2
549549
BeforeEach(func() {
550550
Expect(ioutil.WriteFile(filepath.Join(buildDir, "requirements.txt"), []byte{}, 0644)).To(Succeed())
551551
Expect(os.Mkdir(filepath.Join(buildDir, "vendor"), 0755)).To(Succeed())
552-
mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "-r", filepath.Join(buildDir, "requirements.txt"), "--ignore-installed", "--exists-action=w", fmt.Sprintf("--src=%s/src", depDir), "--no-index", "--no-build-isolation", fmt.Sprintf("--find-links=file://%s/vendor", buildDir)).Return(fmt.Errorf("exit 28"))
552+
mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "-r", filepath.Join(buildDir, "requirements.txt"), "--ignore-installed", "--exists-action=w", fmt.Sprintf("--src=%s/src", depDir), "--no-index", fmt.Sprintf("--find-links=file://%s/vendor", buildDir), "--no-build-isolation").Return(fmt.Errorf("exit 28"))
553553
mockCommand.EXPECT().Execute(buildDir, gomock.Any(), gomock.Any(), "python", "-m", "pip", "install", "-r", filepath.Join(buildDir, "requirements.txt"), "--ignore-installed", "--exists-action=w", fmt.Sprintf("--src=%s/src", depDir)).Return(fmt.Errorf("exit 28"))
554554
})
555555

0 commit comments

Comments
 (0)