@@ -1455,30 +1455,6 @@ def test_assert_equivalent_different_asts(self) -> None:
14551455 with self .assertRaises (AssertionError ):
14561456 black .assert_equivalent ("{}" , "None" )
14571457
1458- def test_shhh_click (self ) -> None :
1459- try :
1460- from click import _unicodefun # type: ignore
1461- except ImportError :
1462- self .skipTest ("Incompatible Click version" )
1463-
1464- if not hasattr (_unicodefun , "_verify_python_env" ):
1465- self .skipTest ("Incompatible Click version" )
1466-
1467- # First, let's see if Click is crashing with a preferred ASCII charset.
1468- with patch ("locale.getpreferredencoding" ) as gpe :
1469- gpe .return_value = "ASCII"
1470- with self .assertRaises (RuntimeError ):
1471- _unicodefun ._verify_python_env ()
1472- # Now, let's silence Click...
1473- black .patch_click ()
1474- # ...and confirm it's silent.
1475- with patch ("locale.getpreferredencoding" ) as gpe :
1476- gpe .return_value = "ASCII"
1477- try :
1478- _unicodefun ._verify_python_env ()
1479- except RuntimeError as re :
1480- self .fail (f"`patch_click()` failed, exception still raised: { re } " )
1481-
14821458 def test_root_logger_not_used_directly (self ) -> None :
14831459 def fail (* args : Any , ** kwargs : Any ) -> None :
14841460 self .fail ("Record created with root logger" )
0 commit comments