We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 823af9a commit aab5d76Copy full SHA for aab5d76
Dockerfile.tmpl
@@ -363,6 +363,7 @@ RUN pip install mpld3 \
363
geoplot \
364
eli5 \
365
kaggle \
366
+ kagglehub \
367
mock \
368
pytest && \
369
/tmp/clean-layer.sh
tests/test_kagglehub.py
@@ -0,0 +1,15 @@
1
+import unittest
2
+from unittest import mock
3
+
4
+import kagglehub
5
6
7
+class TestKagglehub(unittest.TestCase):
8
+ def test_login(self):
9
+ with self.assertLogs('kagglehub', level='INFO') as l:
10
+ with mock.patch("builtins.input") as mock_input:
11
+ mock_input.side_effect = ["lastplacelarry", "some-key"]
12
+ # Disabling credentials validation since network access is disabled in unittest.
13
+ kagglehub.login(validate_credentials=False)
14
15
+ self.assertIn("credentials set", l.output[0])
0 commit comments