# Path: tellurium/utils/omex.py
# MANIFEST_PATTERN = "manifest.xml"
# METADAT_PATTERN = "metadata.*"
# class Entry(object):
# class Creator(object):
#     def __init__(self, location, format=None, formatKey=None, master=False, description=None, creators=None):
#     def __str__(self):
#     def __init__(self, givenName, familyName, organization, email):
# def combineArchiveFromDirectory(directory, omexPath, creators=None, creators_for_all=False):
# def combineArchiveFromEntries(omexPath, entries, workingDir):
# def addEntriesToCombineArchive(omexPath, entries, workingDir):
# def _addEntriesToArchive(omexPath, entries, workingDir, add_entries):
# def extractCombineArchive(omexPath, directory, method="zip"):
# def getLocationsByFormat(omexPath, formatKey=None, method="omex"):
# def listContents(omexPath, method="omex"):
# def printContents(omexPath):


import os
import tempfile
import shutil
import pytest
from tellurium.tests.testdata import TESTDATA_DIR
from tellurium.tests.testdata import OMEX_SHOWCASE
from tellurium.utils import omex
"""
Testing the omex module.
"""
from __future__ import absolute_import, print_function



def test_omex_extractCombineArchive1(tmpdir):
    omex.extractCombineArchive(omexPath=OMEX_SHOWCASE, directory=str(tmpdir), method="zip")


def test_omex_extractCombineArchive2(tmpdir):
    omex.extractCombineArchive(omexPath=OMEX_SHOWCASE, directory=str(tmpdir), method="omex")


def test_omex_extractCombineArchive3(tmpdir):
    tmp_dir = tempfile.mkdtemp()

# Path: tellurium/utils/omex.py
# MANIFEST_PATTERN = "manifest.xml"
# METADAT_PATTERN = "metadata.*"
# class Entry(object):
# class Creator(object):
#     def __init__(self, location, format=None, formatKey=None, master=False, description=None, creators=None):
#     def __str__(self):
#     def __init__(self, givenName, familyName, organization, email):
# def combineArchiveFromDirectory(directory, omexPath, creators=None, creators_for_all=False):
# def combineArchiveFromEntries(omexPath, entries, workingDir):
# def addEntriesToCombineArchive(omexPath, entries, workingDir):
# def _addEntriesToArchive(omexPath, entries, workingDir, add_entries):
# def extractCombineArchive(omexPath, directory, method="zip"):
# def getLocationsByFormat(omexPath, formatKey=None, method="omex"):
# def listContents(omexPath, method="omex"):
# def printContents(omexPath):


# Path: tellurium/tests/test_omex.py
import os
import tempfile
import shutil
import pytest
from tellurium.tests.testdata import TESTDATA_DIR
from tellurium.tests.testdata import OMEX_SHOWCASE
from tellurium.utils import omex

"""
Testing the omex module.
"""
from __future__ import absolute_import, print_function



def test_omex_extractCombineArchive1(tmpdir):
    omex.extractCombineArchive(omexPath=OMEX_SHOWCASE, directory=str(tmpdir), method="zip")


def test_omex_extractCombineArchive2(tmpdir):
    omex.extractCombineArchive(omexPath=OMEX_SHOWCASE, directory=str(tmpdir), method="omex")


def test_omex_extractCombineArchive3(tmpdir):
    tmp_dir = tempfile.mkdtemp()

    omex.extractCombineArchive(omexPath=OMEX_SHOWCASE, directory=str(tmpdir), method="zip")