Skip to content

Commit

Permalink
use separate template for testing preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Sep 16, 2020
1 parent f206f4e commit bd536b7
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/app/preprocessor_test.py
Expand Up @@ -10,7 +10,7 @@ def voila_notebook(notebook_directory):

@pytest.fixture
def voila_args_extra():
return ['--template=test_template']
return ['--template=skip_template']


async def test_markdown_preprocessor(http_server_client, base_url):
Expand Down
19 changes: 19 additions & 0 deletions tests/skip_template/setup.py
@@ -0,0 +1,19 @@
import os
from setuptools import setup


data_files = []
for (dirpath, dirnames, filenames) in os.walk('share/jupyter/voila/templates'):
if filenames:
data_files.append((dirpath, [os.path.join(dirpath, filename) for filename in filenames]))


setup(
name='voila_skip_template',
version="0.0.1",
description="Test template for Voilà",
data_files=data_files,
include_package_data=True,
author='Voilà Development team',
author_email='jupyter@googlegroups.com'
)
@@ -0,0 +1,10 @@
{
"base_template": "classic",
"preprocessors": {
"100-remove-skip-voila-cells": {
"type": "nbconvert.preprocessors.tagremove.TagRemovePreprocessor",
"remove_cell_tags": ["skip-voila"],
"enabled": true
}
}
}
Expand Up @@ -6,12 +6,5 @@
"test_resource": "test resource from config file"
}
}
},
"preprocessors": {
"100-remove-skip-voila-cells": {
"type": "nbconvert.preprocessors.tagremove.TagRemovePreprocessor",
"remove_cell_tags": ["skip-voila"],
"enabled": true
}
}
}
@@ -1,5 +1,3 @@
{%- extends 'classic/index.html.j2' -%}

Hi Voilà!
This is a test template, obviously

Expand Down

0 comments on commit bd536b7

Please sign in to comment.