# Path: q2_types/feature_table/_format.py
# class BIOMV100Format(model.TextFileFormat):
# class BIOMV210Format(model.BinaryFileFormat):
#     def sniff(self):
#     def open(self):
#     def sniff(self):


import shutil
import os
import unittest
from q2_types.feature_table import (BIOMV100Format, BIOMV210Format,
                                    BIOMV100DirFmt, BIOMV210DirFmt)
from qiime2.plugin.testing import TestPluginBase
from qiime2.plugin import ValidationError
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------




class TestFormats(TestPluginBase):
    package = 'q2_types.feature_table.tests'

    def test_biomv100_format_validate_positive(self):
        filepath = self.get_data_path('feature-table_v100.biom')
        format = BIOMV100Format(filepath, mode='r')

        format.validate()

    def test_biomv100_format_validate_negative(self):
        filepath = self.get_data_path('feature-table_v210.biom')

# Path: q2_types/feature_table/_format.py
# class BIOMV100Format(model.TextFileFormat):
# class BIOMV210Format(model.BinaryFileFormat):
#     def sniff(self):
#     def open(self):
#     def sniff(self):


# Path: q2_types/feature_table/tests/test_format.py
import shutil
import os
import unittest
from q2_types.feature_table import (BIOMV100Format, BIOMV210Format,
                                    BIOMV100DirFmt, BIOMV210DirFmt)
from qiime2.plugin.testing import TestPluginBase
from qiime2.plugin import ValidationError

# ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------




class TestFormats(TestPluginBase):
    package = 'q2_types.feature_table.tests'

    def test_biomv100_format_validate_positive(self):
        filepath = self.get_data_path('feature-table_v100.biom')
        format = BIOMV100Format(filepath, mode='r')

        format.validate()

    def test_biomv100_format_validate_negative(self):
        filepath = self.get_data_path('feature-table_v210.biom')

        format = BIOMV100Format(filepath, mode='r')