Skip to content

Commit

Permalink
Adding uv tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blast-hardcheese committed Aug 30, 2024
1 parent ef62220 commit db27652
Show file tree
Hide file tree
Showing 18 changed files with 189 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test-suite/Add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestAdd(t *testing.T) {
case "bun":
pkgs = []string{"lodash", "react", "@replit/protocol"}

case "python3-poetry", "python3-pip":
case "python3-poetry", "python3-pip", "python3-uv":
pkgs = []string{"replit-ai", "flask >=2", "pyyaml", "discord-py 2.3.2"}

default:
Expand Down
2 changes: 1 addition & 1 deletion test-suite/Guess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestGuess(t *testing.T) {
}
}

case "python3-poetry", "python3-pip":
case "python3-poetry", "python3-pip", "python3-uv":
for _, ext := range []string{"py"} {
_, ok := tests[ext]
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion test-suite/Info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestInfo(t *testing.T) {
case "bun":
doInfo(bt, "express", "@replit/crosis", "@distube/spotify")

case "python3-poetry", "python3-pip":
case "python3-poetry", "python3-pip", "python3-uv":
doInfo(bt, "Flask", "replit-ai")

default:
Expand Down
1 change: 1 addition & 0 deletions test-suite/Install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var testInstalls = map[string]bool{
"nodejs-yarn": true,
"python3-poetry": true,
"python3-pip": true,
"python3-uv": true,
}

func TestInstall(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test-suite/List_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestList(t *testing.T) {
},
}

case "python3-poetry", "python3-pip":
case "python3-poetry", "python3-pip", "python3-uv":
templatesToPackages = map[string][]string{
"no-deps": {},
"one-dep": {"django"},
Expand Down
1 change: 1 addition & 0 deletions test-suite/Lock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var testLocks = map[string]bool{
"nodejs-pnpm": true,
"nodejs-yarn": true,
"python3-poetry": true,
"python3-uv": true,
}

func TestLock(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test-suite/Remove_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestRemove(t *testing.T) {
"many-deps": {"express", "eslint", "svelte"},
}

case "python3-poetry", "python3-pip":
case "python3-poetry", "python3-pip", "python3-uv":
pkgsToRemove = map[string][]string{
"one-dep": {"django"},
"many-deps": {"django", "boatman", "ws4py"},
Expand Down
2 changes: 1 addition & 1 deletion test-suite/Search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestSearch(t *testing.T) {
{"@replit", "@replit/crosis"},
})

case "python3-poetry", "python3-pip":
case "python3-poetry", "python3-pip", "python3-uv":
doSearch(bt, []searchTest{
{"flask", "Flask"},
{"replit-ai", "replit-ai"},
Expand Down
1 change: 1 addition & 0 deletions test-suite/WhichLanguage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var testWhichLanguage = map[string]bool{
"nodejs-yarn": true,
"python3-poetry": true,
"python3-pip": true,
"python3-uv": true,
}

func TestWhichLanguage(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django>=4.2.7,<5.0.0
boatman>=^0.0.6,<1.0.0
boatman>=0.0.6,<1.0.0
ws4py>=0.5.1,<1.0.0
Empty file.
15 changes: 15 additions & 0 deletions test-suite/templates/python3-uv/many-deps/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[project]
name = "python-template"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"django >=4.2.7,<5.0.0",
"boatman >=0.0.6,<1.0.0",
"ws4py >=0.5.1,<1.0.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Empty file.
97 changes: 97 additions & 0 deletions test-suite/templates/python3-uv/many-deps/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
13 changes: 13 additions & 0 deletions test-suite/templates/python3-uv/one-dep/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[project]
name = "python-template"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"django>=4.2.6,<5.0.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Empty file.
54 changes: 54 additions & 0 deletions test-suite/templates/python3-uv/one-dep/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit db27652

Please sign in to comment.