1 |
#!/usr/bin/env python
|
|
2 |
|
|
3 |
def func1(): |
1✔ |
4 |
print 1 |
1✔ |
5 |
|
|
6 |
def func2(): |
1✔ |
7 |
print 2 |
× |
8 |
|
|
9 |
def func3(): # pragma: no cover |
|
10 |
print 3 |
|
11 |
|
|
12 |
if __name__ == "__main__": |
1✔ |
13 |
import sys |
1✔ |
14 |
#func1()
|
|
15 |
#func2()
|
|
16 |
if len(sys.argv) > 1: |
1✔ |
17 |
if sys.argv[1] == "1": |
1✔ |
18 |
func1() |
1✔ |
19 |
if sys.argv[1] == "2": |
1✔ |
20 |
func2() |
× |
21 |
|