# Path: onecodex/exceptions.py
# class OneCodexException(Exception):
#     pass


import pytest
import builtins
import json
import mock
import os
import sys
from xml.etree import ElementTree as ET
from onecodex.exceptions import OneCodexException
        from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import exporters
    from onecodex.notebooks import exporters
def test_fixture(mock_reports, metaval):
    # changes to get_ipython should be consistent within test but not between tests
    assert get_ipython().meta.get("test") is None
    get_ipython().meta["test"] = metaval
    assert get_ipython().meta.get("test") == metaval


def test_set_style(mock_reports):

    mystyle = "h1 { text-align: center; }"
    obj = report.set_style(mystyle)
    bundle = obj._repr_mimebundle_()

    assert len(bundle) == 2
    assert len(bundle[0]) == len(bundle[1]) == 1
    assert bundle[1]["onecodex"] == "head.style"
    ET.fromstring(bundle[0]["text/css"])
    obj.display()


def test_set_center_header(mock_reports):

    mytext = "center header"
    mystyle = "text-align: center"
    obj = report.set_center_header(mytext, mystyle)
    bundle = obj._repr_mimebundle_()

    assert len(bundle) == 1
    assert mytext in bundle["text/html"]
    assert mystyle in bundle["text/html"]

# Path: onecodex/exceptions.py
# class OneCodexException(Exception):
#     pass


# Path: tests/test_notebooks.py
import pytest
import builtins
import json
import mock
import os
import sys
from xml.etree import ElementTree as ET
from onecodex.exceptions import OneCodexException
        from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import report
    from onecodex.notebooks import exporters
    from onecodex.notebooks import exporters

def test_fixture(mock_reports, metaval):
    # changes to get_ipython should be consistent within test but not between tests
    assert get_ipython().meta.get("test") is None
    get_ipython().meta["test"] = metaval
    assert get_ipython().meta.get("test") == metaval


def test_set_style(mock_reports):

    mystyle = "h1 { text-align: center; }"
    obj = report.set_style(mystyle)
    bundle = obj._repr_mimebundle_()

    assert len(bundle) == 2
    assert len(bundle[0]) == len(bundle[1]) == 1
    assert bundle[1]["onecodex"] == "head.style"
    ET.fromstring(bundle[0]["text/css"])
    obj.display()


def test_set_center_header(mock_reports):

    mytext = "center header"
    mystyle = "text-align: center"
    obj = report.set_center_header(mytext, mystyle)
    bundle = obj._repr_mimebundle_()

    assert len(bundle) == 1
    assert mytext in bundle["text/html"]
    assert mystyle in bundle["text/html"]

    ET.fromstring(bundle["text/html"])