File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212
1313def test__is_string_like ():
14+ """Test `_is_string_like()`."""
1415 assert _is_string_like ("foo" ) == True
1516 assert _is_string_like (12345 ) == False
1617
1718
1819def test_filename_from_string ():
20+ """Test `filename()` using a string."""
1921 assert filename ("test_file_name" ) == "test_file_name"
2022
2123
2224def test_filename_from_handle (tmpdir ):
25+ """Test `filename()` using a file handle."""
2326 path = str (tmpdir )
2427 fhandle = tmpdir .join ("foo.txt" )
2528 assert filename (fhandle ) == os .path .join (path , "foo.txt" )
2629
2730
2831def test_flatten ():
32+ """Test `flatten()` using a tuple."""
2933 assert flatten (("foo" , "bar" )) == "foobar"
3034
3135
3236def test_strip_prefix ():
37+ """Test `strip_prefix()`."""
3338 assert strip_prefix ("foobar" , "foo" ) == "bar"
3439 assert strip_prefix ("foobar" , "bar" ) == "foobar"
You can’t perform that action at this time.
0 commit comments