mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""pytest fixtures"""
|
||||
from importlib import reload
|
||||
import os
|
||||
import types
|
||||
from importlib import reload
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -5,9 +5,10 @@ import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
from bootstrap import bootstrap
|
||||
import pytest
|
||||
|
||||
from bootstrap import bootstrap
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"requested,expected",
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
"""
|
||||
Test conda commandline wrappers
|
||||
"""
|
||||
from tljh import conda
|
||||
from tljh import installer
|
||||
import os
|
||||
import pytest
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
import pytest
|
||||
|
||||
from tljh import conda, installer
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def prefix():
|
||||
|
||||
@@ -56,7 +56,7 @@ def test_set_overwrite():
|
||||
def test_unset_no_mutate():
|
||||
conf = {"a": "b"}
|
||||
|
||||
new_conf = config.unset_item_from_config(conf, "a")
|
||||
config.unset_item_from_config(conf, "a")
|
||||
assert conf == {"a": "b"}
|
||||
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
Test configurer
|
||||
"""
|
||||
|
||||
from traitlets.config import Config
|
||||
import os
|
||||
import sys
|
||||
|
||||
from traitlets.config import Config
|
||||
|
||||
from tljh import configurer
|
||||
|
||||
|
||||
|
||||
@@ -3,15 +3,14 @@ Unit test functions in installer.py
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
from subprocess import PIPE, run
|
||||
from unittest import mock
|
||||
from subprocess import run, PIPE
|
||||
|
||||
from packaging.version import parse as V
|
||||
from packaging.specifiers import SpecifierSet
|
||||
import pytest
|
||||
from packaging.specifiers import SpecifierSet
|
||||
from packaging.version import parse as V
|
||||
|
||||
from tljh import conda
|
||||
from tljh import installer
|
||||
from tljh import conda, installer
|
||||
from tljh.yaml import yaml
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Unit test functions in installer.py
|
||||
import os
|
||||
from datetime import date
|
||||
|
||||
from tljh import migrator, config
|
||||
from tljh import config, migrator
|
||||
|
||||
|
||||
def test_migrate_config(tljh_dir):
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
"""Test traefik configuration"""
|
||||
import os
|
||||
|
||||
import toml
|
||||
import pytest
|
||||
import toml
|
||||
|
||||
from tljh import config
|
||||
from tljh import traefik
|
||||
from tljh import config, traefik
|
||||
|
||||
|
||||
def test_download_traefik(tmpdir):
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
"""
|
||||
Test wrappers in tljw.user module
|
||||
"""
|
||||
from tljh import user
|
||||
import grp
|
||||
import os
|
||||
import os.path
|
||||
import pwd
|
||||
import stat
|
||||
import uuid
|
||||
import pwd
|
||||
import grp
|
||||
|
||||
import pytest
|
||||
|
||||
from tljh import user
|
||||
|
||||
|
||||
def test_ensure_user():
|
||||
"""
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import pytest
|
||||
from tljh import utils
|
||||
import subprocess
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
import pytest
|
||||
|
||||
from tljh import utils
|
||||
|
||||
|
||||
def test_run_subprocess_exception(mocker):
|
||||
|
||||
Reference in New Issue
Block a user