mirror of
https://github.com/jupyter/notebook.git
synced 2024-11-27 03:20:27 +08:00
Revert "Rebase PR 1468 : Allow root user to run tests"
This reverts commit e1ff71d3cf
.
This commit is contained in:
parent
ed86d6e426
commit
5d2bc6c420
@ -1,9 +1,6 @@
|
||||
# Installs Jupyter Notebook and IPython kernel from the current branch
|
||||
# Another Docker container should inherit with `FROM jupyter/notebook`
|
||||
# to run actual services.
|
||||
#
|
||||
# For opinionated stacks of ready-to-run Jupyter applications in Docker,
|
||||
# check out docker-stacks <https://github.com/jupyter/docker-stacks>
|
||||
|
||||
FROM ubuntu:14.04
|
||||
|
||||
@ -108,4 +105,4 @@ WORKDIR /notebooks
|
||||
EXPOSE 8888
|
||||
|
||||
ENTRYPOINT ["tini", "--"]
|
||||
CMD ["jupyter", "notebook", "--no-browser", "--allow-root"]
|
||||
CMD ["jupyter", "notebook"]
|
||||
|
@ -34,7 +34,7 @@ class TimeoutError(Exception):
|
||||
|
||||
class NotebookTestBase(TestCase):
|
||||
"""A base class for tests that need a running notebook.
|
||||
|
||||
|
||||
This create some empty config and runtime directories
|
||||
and then starts the notebook server with them.
|
||||
"""
|
||||
@ -60,7 +60,7 @@ class NotebookTestBase(TestCase):
|
||||
return
|
||||
|
||||
raise TimeoutError("The notebook server didn't start up correctly.")
|
||||
|
||||
|
||||
@classmethod
|
||||
def wait_until_dead(cls):
|
||||
"""Wait for the server process to terminate after shutdown"""
|
||||
@ -84,7 +84,7 @@ class NotebookTestBase(TestCase):
|
||||
cls.data_dir = data_dir
|
||||
cls.runtime_dir = TemporaryDirectory()
|
||||
cls.notebook_dir = TemporaryDirectory()
|
||||
|
||||
|
||||
started = Event()
|
||||
def start_thread():
|
||||
app = cls.notebook = NotebookApp(
|
||||
@ -97,7 +97,6 @@ class NotebookTestBase(TestCase):
|
||||
notebook_dir=cls.notebook_dir.name,
|
||||
base_url=cls.url_prefix,
|
||||
config=cls.config,
|
||||
allow_root=True,
|
||||
)
|
||||
# don't register signal handler during tests
|
||||
app.init_signal = lambda : None
|
||||
|
@ -76,7 +76,7 @@ def test_nb_dir_root():
|
||||
def test_generate_config():
|
||||
with TemporaryDirectory() as td:
|
||||
app = NotebookApp(config_dir=td)
|
||||
app.initialize(['--generate-config', '--allow-root'])
|
||||
app.initialize(['--generate-config'])
|
||||
with nt.assert_raises(NoStart):
|
||||
app.start()
|
||||
assert os.path.exists(os.path.join(td, 'jupyter_notebook_config.py'))
|
||||
|
Loading…
Reference in New Issue
Block a user