| Conditions | 7 |
| Total Lines | 14 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import os |
||
| 10 | def test_get_file_name(): |
||
| 11 | path1 = "C:\Windows\Sysmte32\Crapware" |
||
| 12 | path2 = "C:\Windows\Sysmte32\Crapware\\" |
||
| 13 | path3 = "C:\Windows\Sysmte32\Crapware\Shittyexe.exe" |
||
| 14 | path4 = "/bin/dir/var/mnt/usr/queenbee" |
||
| 15 | path5 = "/bin/dir/var/mnt/usr/queenbee/" |
||
| 16 | path6 = "/bin/dir/var/mnt/usr/queenbee/notmyproblem.tif" |
||
| 17 | |||
| 18 | assert get_file_name(path1) == "Crapware" |
||
| 19 | assert get_file_name(path2) == '' |
||
| 20 | assert get_file_name(path3) == "Shittyexe.exe" |
||
| 21 | assert get_file_name(path4) == "queenbee" |
||
| 22 | assert get_file_name(path5) == '' |
||
| 23 | assert get_file_name(path6) == "notmyproblem.tif" |
||
| 24 | |||
| 27 | test_get_file_name() |