ashb commented on a change in pull request #16954:
URL: https://github.com/apache/airflow/pull/16954#discussion_r669509646



##########
File path: tests/operators/test_python.py
##########
@@ -58,6 +64,17 @@
 ]
 
 
[email protected]()
+def pypi_server():
+    if not os.path.exists('/root/packages'):
+        os.makedirs('/root/packages')
+    process = subprocess.Popen(['pypi-server', '--port=8282'])
+    yield
+    process.kill()
+    shutil.rmtree('/root/packages')
+
+
+

Review comment:
       Where is this `pypi-serve` command coming from?
   
   Simpler might be to just use `python -m http.server --directory ` as that is 
part of the standard library
   
   ```suggestion
   @pytest.fixture()
   def pypi_server(tmpdir):
       process = subprocess.Popen(['python', '-m', 'http.server', 
'--directory', str(tmpdir),  '--port=8282'])
       yield
       process.kill()
   
   
   ```

##########
File path: tests/operators/test_python.py
##########
@@ -817,6 +837,51 @@ def f():
 
         self._run_as_operator(f, requirements=['funcsigs', 'dill'], 
system_site_packages=False)
 
+    def test_private_repo_fallback_to_pypi_installation(self):
+
+        c = Connection("private_repo_test_conn",
+                       "private_pypi",
+                       host="localhost",
+                       schema="http",
+                       extra=json.dumps({"pypi_as_fallback": True,
+                                         "path": "/repository/python/simple"}),

Review comment:
       ```suggestion
                          extra={"pypi_as_fallback": True,
                                 "path": "/repository/python/simple"},
   ```
   
   should work now




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to