Commit b2923317 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

[sphinx] Fixed doc test

parent 08fb3a61
......@@ -6,9 +6,11 @@ from bob.learn.tensorflow.utils.hooks import EarlyStopping, EarlyStopException
import nose
import tensorflow as tf
import shutil
from nose.plugins.attrib import attr
@nose.tools.raises(EarlyStopException)
@attr('slow')
def test_early_stopping_linear_classifier():
config = read_config_files([
datafile('mnist_input_fn.py', __name__),
......@@ -34,6 +36,7 @@ def test_early_stopping_linear_classifier():
@nose.tools.raises(EarlyStopException)
@attr('slow')
def test_early_stopping_logit_trainer():
config = read_config_files([
datafile('mnist_input_fn.py', __name__),
......
......@@ -12,6 +12,7 @@ import pkg_resources
from bob.learn.tensorflow.utils.hooks import LoggerHookEstimator
from bob.learn.tensorflow.loss import mean_cross_entropy_loss
from nose.plugins.attrib import attr
import shutil
import os
......@@ -26,7 +27,7 @@ validation_batch_size = 250
epochs = 1
steps = 5000
@attr('slow')
def test_logitstrainer_images():
# Trainer logits
try:
......
......@@ -18,6 +18,7 @@ from .test_estimator_onegraph import run_logitstrainer_mnist
from bob.learn.tensorflow.estimators import Logits
from bob.learn.tensorflow.network import dummy
from bob.learn.tensorflow.script.style_transfer import style_transfer
from nose.plugins.attrib import attr
dummy_config = datafile('style_transfer.py', __name__)
CONFIG = '''
......@@ -46,7 +47,7 @@ batch_size = 32
epochs = 1
steps = 100
@attr('slow')
def test_style_transfer():
with open(dummy_config, 'w') as f:
f.write(CONFIG)
......
......@@ -36,7 +36,8 @@ The Boston Housing Prices dataset
.. doctest::
>>> boston_housing = keras.datasets.boston_housing
>>> (train_data, train_labels), (test_data, test_labels) = boston_housing.load_data()
>>> print("doctest s**t"); (train_data, train_labels), (test_data, test_labels) = boston_housing.load_data() # doctest: +ELLIPSIS
doc...
>>> print("Training set: {}".format(train_data.shape))
Training set: (404, 13)
>>> print("Testing set: {}".format(test_data.shape))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment