@@ -78,21 +78,6 @@ def test_local_dir_image_name(repo_with_content):
78
78
)
79
79
80
80
81
- def test_build_kwargs (repo_with_content ):
82
- upstream , sha1 = repo_with_content
83
- argv = [upstream ]
84
- app = make_r2d (argv )
85
- app .extra_build_kwargs = {"somekey" : "somevalue" }
86
-
87
- with patch .object (docker .APIClient , "build" ) as builds :
88
- builds .return_value = []
89
- app .build ()
90
- builds .assert_called_once ()
91
- args , kwargs = builds .call_args
92
- assert "somekey" in kwargs
93
- assert kwargs ["somekey" ] == "somevalue"
94
-
95
-
96
81
def test_run_kwargs (repo_with_content ):
97
82
upstream , sha1 = repo_with_content
98
83
argv = [upstream ]
@@ -107,25 +92,6 @@ def test_run_kwargs(repo_with_content):
107
92
assert kwargs ["somekey" ] == "somevalue"
108
93
109
94
110
- def test_root_not_allowed ():
111
- with TemporaryDirectory () as src , patch ("os.geteuid" ) as geteuid :
112
- geteuid .return_value = 0
113
- argv = [src ]
114
- with pytest .raises (SystemExit ) as exc :
115
- app = make_r2d (argv )
116
- assert exc .code == 1
117
-
118
- with pytest .raises (ValueError ):
119
- app = Repo2Docker (repo = src , run = False )
120
- app .build ()
121
-
122
- app = Repo2Docker (repo = src , user_id = 1000 , user_name = "jovyan" , run = False )
123
- app .initialize ()
124
- with patch .object (docker .APIClient , "build" ) as builds :
125
- builds .return_value = []
126
- app .build ()
127
- builds .assert_called_once ()
128
-
129
95
130
96
def test_dryrun_works_without_docker (tmpdir , capsys ):
131
97
with chdir (tmpdir ):
0 commit comments