File: test_utils_runtime.py

package info (click to toggle)
huggingface-hub 1.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,424 kB
  • sloc: python: 45,857; sh: 434; makefile: 33
file content (13 lines) | stat: -rw-r--r-- 375 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
import unittest

from huggingface_hub.utils._runtime import is_google_colab, is_notebook


class TestRuntimeUtils(unittest.TestCase):
    def test_is_notebook(self) -> None:
        """Test `is_notebook`."""
        self.assertFalse(is_notebook())

    def test_is_google_colab(self) -> None:
        """Test `is_google_colab`."""
        self.assertFalse(is_google_colab())