File: err_146.py

package info (click to toggle)
python-refurb 1.27.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,700 kB
  • sloc: python: 9,468; makefile: 40; sh: 6
file content (61 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import os
from os.path import isabs, isdir, isfile, islink
from pathlib import Path

file = Path("filename")
filename = "filename"
filename2 = b"filename"

# these should match

os.path.isabs("filename")
os.path.isdir("filename")
os.path.isfile("filename")
os.path.islink("filename")

os.path.isabs(file)
os.path.isdir(file)
os.path.isfile(file)
os.path.islink(file)

os.path.isabs(b"filename")
os.path.isdir(b"filename")
os.path.isfile(b"filename")
os.path.islink(b"filename")

os.path.isabs(filename)
os.path.isdir(filename)
os.path.isfile(filename)
os.path.islink(filename)

os.path.isabs(filename2)
os.path.isdir(filename2)
os.path.isfile(filename2)
os.path.islink(filename2)

isabs("filename")
isdir("filename")
isfile("filename")
islink("filename")

# these should not

os.path.ismount("somefile")

file.is_absolute()
file.is_dir()
file.is_file()
file.is_symlink()
file.is_mount()

os.path.isdir(1)
os.path.isfile(1)
os.path.islink(1)
os.path.ismount(1)

fd = 1

os.path.isdir(fd)
os.path.isfile(fd)
os.path.islink(fd)
os.path.ismount(fd)