Skip to content

Commit

Permalink
add a python test
Browse files Browse the repository at this point in the history
  • Loading branch information
coffee-cup committed Jan 30, 2025
1 parent b86a44e commit 7ad9e96
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/resolver/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,23 @@ func TestPackageResolverWithPreviousVersions(t *testing.T) {
assert.Equal(t, "1.23", pkg.Version)
assert.Equal(t, DefaultSource, pkg.Source)
}

func PythonTest1(t *testing.T) {
resolver, err := NewResolver(mise.TestInstallDir)
require.NoError(t, err)

resolver.Default("python", "3.11")
pkg := resolver.Get("python")
assert.Equal(t, "3.11", pkg.Version)
assert.Equal(t, DefaultSource, pkg.Source)
}

func PythonTest2(t *testing.T) {
resolver, err := NewResolver(mise.TestInstallDir)
require.NoError(t, err)

resolver.Default("python", "3.11")
pkg := resolver.Get("python")
assert.Equal(t, "3.11", pkg.Version)
assert.Equal(t, DefaultSource, pkg.Source)
}

0 comments on commit 7ad9e96

Please sign in to comment.