@@ -10,77 +10,80 @@ def setUp(self):
10
10
11
11
def test_atom (self ):
12
12
options = ebuildtester .parse .parse_commandline (
13
- self .args + ["--atom" , "=SECTION/ATOM-1.0.0" ])
13
+ self .args + ["--atom" , "=SECTION/ATOM-1.0.0" ], {} )
14
14
self .assertTrue (Atom ("=SECTION/ATOM-1.0.0" ) in options .atom )
15
15
16
16
def test_binhost (self ):
17
17
options = ebuildtester .parse .parse_commandline (
18
- self .args + ["--manual" , "--binhost" , "http://localhost:8080" ])
18
+ self .args + ["--manual" , "--binhost" , "http://localhost:8080" ], {} )
19
19
self .assertIn ("http://localhost:8080" , options .binhost )
20
20
21
21
def test_live_ebuild (self ):
22
22
options = ebuildtester .parse .parse_commandline (
23
- self .args + ["--manual" , "--live-ebuild" ])
23
+ self .args + ["--manual" , "--live-ebuild" ], {} )
24
24
self .assertTrue (options .live_ebuild )
25
25
26
26
def test_manual (self ):
27
- options = ebuildtester .parse .parse_commandline (self .args + ["--manual" ])
27
+ options = ebuildtester .parse .parse_commandline (self .args + ["--manual" ], {} )
28
28
self .assertTrue (options .manual )
29
29
30
30
def test_portage_dir (self ):
31
31
import sys
32
32
if sys .version_info [0 ] == 2 and sys .version_info [1 ] == 6 :
33
- self .assertRaises (Exception , ebuildtester .parse .parse_commandline ())
33
+ self .assertRaises (Exception , ebuildtester .parse .parse_commandline ({} ))
34
34
else :
35
35
with self .assertRaises (Exception ):
36
- options = ebuildtester .parse .parse_commandline ()
36
+ options = ebuildtester .parse .parse_commandline ({} )
37
37
options = ebuildtester .parse .parse_commandline (
38
- self .args + ["--manual" ])
38
+ self .args + ["--manual" ], {} )
39
39
self .assertEqual ("~/gentoo" , options .portage_dir )
40
40
41
41
def test_overlay_dir (self ):
42
42
options = ebuildtester .parse .parse_commandline (
43
- self .args + ["--manual" , "--overlay-dir" , "." ])
43
+ self .args + ["--manual" , "--overlay-dir" , "." ], {} )
44
44
self .assertTrue ("." in options .overlay_dir )
45
+ options = ebuildtester .parse .parse_commandline (
46
+ self .args + ["--manual" , "--overlay-dir" , "." ], {"overlay_dir" : ["/overlay/path" ]})
47
+ self .assertTrue ("/overlay/path" in options .overlay_dir )
45
48
46
49
def test_update (self ):
47
50
options = ebuildtester .parse .parse_commandline (
48
- self .args + ["--manual" , "--update" ])
51
+ self .args + ["--manual" , "--update" ], {} )
49
52
self .assertFalse (options .update )
50
53
51
54
def test_threads (self ):
52
55
options = ebuildtester .parse .parse_commandline (
53
- self .args + ["--manual" , "--threads" , "4" ])
56
+ self .args + ["--manual" , "--threads" , "4" ], {} )
54
57
self .assertEqual (options .threads , 4 )
55
58
56
59
def test_use (self ):
57
60
options = ebuildtester .parse .parse_commandline (
58
- self .args + ["--manual" , "--use" , "a" , "b" , "c" ])
61
+ self .args + ["--manual" , "--use" , "a" , "b" , "c" ], {} )
59
62
self .assertTrue ("a" in options .use )
60
63
self .assertTrue ("b" in options .use )
61
64
self .assertTrue ("c" in options .use )
62
65
63
66
def test_unmask (self ):
64
67
options = ebuildtester .parse .parse_commandline (
65
- self .args + ["--manual" , "--unmask" , "ATOM" ])
68
+ self .args + ["--manual" , "--unmask" , "ATOM" ], {} )
66
69
self .assertTrue ("ATOM" in options .unmask )
67
70
68
71
def test_gcc_version (self ):
69
72
options = ebuildtester .parse .parse_commandline (
70
- self .args + ["--manual" , "--gcc-version" , "VER" ])
73
+ self .args + ["--manual" , "--gcc-version" , "VER" ], {} )
71
74
self .assertEqual ("VER" , options .gcc_version )
72
75
73
76
def test_python_single_target (self ):
74
77
options = ebuildtester .parse .parse_commandline (
75
- self .args + ["--manual" , "--python-single-target" , "-* python3_8" ])
78
+ self .args + ["--manual" , "--python-single-target" , "-* python3_8" ], {} )
76
79
self .assertEqual ("-* python3_8" , options .python_single_target )
77
80
78
81
def test_python_targets (self ):
79
82
options = ebuildtester .parse .parse_commandline (
80
- self .args + ["--manual" , "--python-targets" , "python3_8" ])
83
+ self .args + ["--manual" , "--python-targets" , "python3_8" ], {} )
81
84
self .assertEqual ("python3_8" , options .python_targets )
82
85
83
86
def test_docker_image (self ):
84
87
options = ebuildtester .parse .parse_commandline (
85
- self .args + ["--manual" ])
88
+ self .args + ["--manual" ], {} )
86
89
self .assertEqual (options .docker_image , "gentoo/stage3" )
0 commit comments