@@ -999,14 +999,15 @@ def test_with_suffix_windows(self):
999999 self .assertRaises (ValueError , P ('c:a/b' ).with_suffix , 'c\\ d' )
10001000 self .assertRaises (ValueError , P ('c:a/b' ).with_suffix , '.c/d' )
10011001 self .assertRaises (ValueError , P ('c:a/b' ).with_suffix , '.c\\ d' )
1002+ self .assertRaises (TypeError , P ('c:a/b' ).with_suffix , None )
10021003
10031004 def test_with_suffix_empty (self ):
10041005 P = self .cls
10051006 # Path doesn't have a "filename" component.
10061007 self .assertRaises (ValueError , P ('' ).with_suffix , '.gz' )
10071008 self .assertRaises (ValueError , P ('/' ).with_suffix , '.gz' )
10081009
1009- def test_with_suffix_seps (self ):
1010+ def test_with_suffix_invalid (self ):
10101011 P = self .cls
10111012 # Invalid suffix.
10121013 self .assertRaises (ValueError , P ('a/b' ).with_suffix , 'gz' )
@@ -1017,6 +1018,7 @@ def test_with_suffix_seps(self):
10171018 self .assertRaises (ValueError , P ('a/b' ).with_suffix , '.c/.d' )
10181019 self .assertRaises (ValueError , P ('a/b' ).with_suffix , './.d' )
10191020 self .assertRaises (ValueError , P ('a/b' ).with_suffix , '.d/.' )
1021+ self .assertRaises (TypeError , P ('a/b' ).with_suffix , None )
10201022
10211023 def test_relative_to_common (self ):
10221024 P = self .cls
0 commit comments