File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,7 @@ python_test(
3636 "__init___test.py" ,
3737 "wheel_test.py" ,
3838 ],
39- test_runner = "pytest" ,
4039 deps = [
4140 ":wheel" ,
42- "//third_party/python:pytest" ,
4341 ],
4442)
Original file line number Diff line number Diff line change 11import click .testing
2+ import unittest
23import unittest .mock
34import tools .wheel_resolver as sut
45
56
6- class TestMain :
7+ class TestMain ( unittest . TestCase ) :
78 def test_help (self ) -> None :
89 runner = click .testing .CliRunner ()
910 result = runner .invoke (cli = sut .main , args = ["--help" ])
Original file line number Diff line number Diff line change 1- import pytest
21import tools .wheel_resolver .wheel as sut
32import collections
43import typing
4+ import unittest
55import unittest .mock
66import distlib .locators
77import distlib .database
1313)
1414
1515
16- class TestUrl :
16+ class TestUrl ( unittest . TestCase ) :
1717 def _mock_locator (
1818 self ,
1919 * ,
@@ -36,7 +36,7 @@ def _mock_locator(
3636 )
3737
3838 def test_no_distribution (self ) -> None :
39- with pytest . raises (sut .DistributionNotFoundError ):
39+ with self . assertRaises (sut .DistributionNotFoundError ):
4040 sut .url (
4141 package_name = "" ,
4242 package_version = None ,
@@ -45,15 +45,15 @@ def test_no_distribution(self) -> None:
4545 )
4646
4747 def test_no_compatible_urls (self ) -> None :
48- with pytest . raises (sut .CompatibleUrlNotFoundError ):
48+ with self . assertRaises (sut .CompatibleUrlNotFoundError ):
4949 sut .url (
5050 package_name = "" ,
5151 package_version = None ,
5252 tags = [],
5353 locator = self ._mock_locator (),
5454 )
5555
56- @pytest . mark .skip ("caplog doesn't capture logging" )
56+ @unittest .skip ("caplog doesn't capture logging" )
5757 def test_warns_multiple_compatible_urls (self , caplog ) -> None :
5858 with caplog .at_level (logging .WARNING , logger = sut .__name__ ):
5959 sut .url (
@@ -73,7 +73,7 @@ def test_warns_multiple_compatible_urls(self, caplog) -> None:
7373 assert len (caplog .records ) > 0
7474 assert any (x .level == logging .WARNING for x in caplog .records )
7575
76- @pytest . mark .skip (
76+ @unittest .skip (
7777 "ordering and selection is unclear; this test case should be updated if we have a preference for a specific URL when collissions happen."
7878 )
7979 def test_preferred_url (self ) -> None :
You can’t perform that action at this time.
0 commit comments