Skip to content

Commit

Permalink
Improve pip test logs (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
sverdlov93 authored Sep 18, 2022
1 parent df8782d commit cb5e553
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
17 changes: 9 additions & 8 deletions build/python_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ func testGenerateBuildInfoForPython(t *testing.T, pythonTool pythonutils.PythonT
pythonModule.SetName(moduleName)
assert.NoError(t, pythonModule.RunInstallAndCollectDependencies(cmdArgs))
buildInfo, err := pythonBuild.ToBuildInfo()
assert.NoError(t, err)
// Verify results.
expectedBuildInfoJson := filepath.Join(projectPath, expectedResultsJson)
expectedBuildInfo := testdatautils.GetBuildInfo(t, expectedBuildInfoJson)
match, err := entities.IsEqualModuleSlices(buildInfo.Modules, expectedBuildInfo.Modules)
assert.NoError(t, err)
if !match {
testdatautils.PrintBuildInfoMismatch(t, expectedBuildInfo.Modules, buildInfo.Modules)
if assert.NoError(t, err) {
// Verify results.
expectedBuildInfoJson := filepath.Join(projectPath, expectedResultsJson)
expectedBuildInfo := testdatautils.GetBuildInfo(t, expectedBuildInfoJson)
match, err := entities.IsEqualModuleSlices(buildInfo.Modules, expectedBuildInfo.Modules)
assert.NoError(t, err)
if !match {
testdatautils.PrintBuildInfoMismatch(t, expectedBuildInfo.Modules, buildInfo.Modules)
}
}
}
5 changes: 3 additions & 2 deletions utils/pythonutils/piputils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ func TestDetermineModuleName(t *testing.T) {

// Determine module name
packageName, err := getPackageNameFromSetuppy(tmpProjectPath)
assert.NoError(t, err)
assert.Equal(t, test.expectedPackageName, packageName)
if assert.NoError(t, err) {
assert.Equal(t, test.expectedPackageName, packageName)
}
})
}
}

0 comments on commit cb5e553

Please sign in to comment.