File: os-path-exists

package info (click to toggle)
python-mockito 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 528 kB
  • sloc: python: 4,102; makefile: 206
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")