Debian Codegraph @

tests/scripts/touch

raw
1 #!/usr/bin/env python
2 """
3 <description>
4 this is a mock touch command written to provide portability
5 to non-unix platforms that don't have the touch command. It
6 uses touchfile to replace the very baseline functionality used
7 within the in-toto test suite.
8
9 <Usage>
10 You will probably find a couple of tests decorated as follows:
11
12 @mock.patch.dict(os.environ, $PATH_TO_THIS FOLDER)
13 def test_that_requires_to_execute_touch(...)
14 ...
15
16 This will automatically make it so that in-toto popens this touch executable
17 instead of the system's touch.
18
19 This script is *not* meant to do thorough checking of its inputs, so use
20 it with care.
21
22 <Author>
23 Santiago Torres-Arias <[email protected]>
24
25 <Date>
26 1527623020
27 """
28 import sys
29
30 open(sys.argv[1], "a+").close()
31 sys.exit(0)