File: os-path-exists

package info (click to toggle)
python-mockito 1.2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 492 kB
  • sloc: python: 3,876; makefile: 211
file content (12 lines) | stat: -rwxr-xr-x 200 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/python3

import os
import os.path

assert not os.path.exists("/proc/void")

import mockito

mockito.when(os.path).exists("/proc/void").thenReturn(True)

assert os.path.exists("/proc/void")