Skip to content

Commit c31df61

Browse files
committed
Update unit tests to fit "no default master branch" of poetry-core#192
1 parent b48a441 commit c31df61

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

tests/installation/test_installer.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,8 @@ def test_installer_uses_prereleases_if_they_are_compatible(
20622062
package.python_versions = "~2.7 || ^3.4"
20632063
package.add_dependency(
20642064
Factory.create_dependency(
2065-
"prerelease", {"git": "https://github.com/demo/prerelease.git"}
2065+
"prerelease",
2066+
{"git": "https://github.com/demo/prerelease.git", "rev": "main"},
20662067
)
20672068
)
20682069

tests/installation/test_installer_old.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,8 @@ def test_installer_uses_prereleases_if_they_are_compatible(
17101710
package.python_versions = "~2.7 || ^3.4"
17111711
package.add_dependency(
17121712
Factory.create_dependency(
1713-
"prerelease", {"git": "https://github.com/demo/prerelease.git"}
1713+
"prerelease",
1714+
{"git": "https://github.com/demo/prerelease.git", "rev": "main"},
17141715
)
17151716
)
17161717

tests/puzzle/test_solver.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,10 @@ def test_solver_can_resolve_git_dependencies(solver, repo, package):
12271227
repo.add_package(cleo)
12281228

12291229
package.add_dependency(
1230-
Factory.create_dependency("demo", {"git": "https://github.com/demo/demo.git"})
1230+
Factory.create_dependency(
1231+
"demo",
1232+
{"git": "https://github.com/demo/demo.git", "rev": DEFAULT_SOURCE_REF},
1233+
)
12311234
)
12321235

12331236
transaction = solver.solve()
@@ -1598,7 +1601,10 @@ def test_solver_git_dependencies_update(solver, repo, package, installed):
15981601
installed.add_package(demo_installed)
15991602

16001603
package.add_dependency(
1601-
Factory.create_dependency("demo", {"git": "https://github.com/demo/demo.git"})
1604+
Factory.create_dependency(
1605+
"demo",
1606+
{"git": "https://github.com/demo/demo.git", "rev": DEFAULT_SOURCE_REF},
1607+
)
16021608
)
16031609

16041610
transaction = solver.solve()

0 commit comments

Comments
 (0)