# Path: q2_types/ordination/_format.py
# class OrdinationFormat(model.TextFileFormat):
# class ProcrustesStatisticsFmt(model.TextFileFormat):
#     def sniff(self):
#     def validate(self, level):
#     METADATA_COLUMNS = {
#         'true M^2 value',
#         'p-value for true M^2 value',
#         'number of Monte Carlo permutations',
#     }


import os
import shutil
import unittest
from q2_types.ordination import (
    OrdinationFormat, OrdinationDirectoryFormat,
    ProcrustesStatisticsFmt, ProcrustesStatisticsDirFmt)
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.ordination.tests'

    def test_ordination_format_validate_positive(self):
        filepath = self.get_data_path('pcoa-results-NxN.txt')
        format = OrdinationFormat(filepath, mode='r')

        format.validate()

    def test_ordination_format_validate_negative(self):
        filepath = self.get_data_path('not-pcoa-results.txt')

# Path: q2_types/ordination/_format.py
# class OrdinationFormat(model.TextFileFormat):
# class ProcrustesStatisticsFmt(model.TextFileFormat):
#     def sniff(self):
#     def validate(self, level):
#     METADATA_COLUMNS = {
#         'true M^2 value',
#         'p-value for true M^2 value',
#         'number of Monte Carlo permutations',
#     }


# Path: q2_types/ordination/tests/test_format.py
import os
import shutil
import unittest
from q2_types.ordination import (
    OrdinationFormat, OrdinationDirectoryFormat,
    ProcrustesStatisticsFmt, ProcrustesStatisticsDirFmt)
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.ordination.tests'

    def test_ordination_format_validate_positive(self):
        filepath = self.get_data_path('pcoa-results-NxN.txt')
        format = OrdinationFormat(filepath, mode='r')

        format.validate()

    def test_ordination_format_validate_negative(self):
        filepath = self.get_data_path('not-pcoa-results.txt')

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