# 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
        filepath = self.get_data_path('pcoa-results-NxN.txt')
        shutil.copy(filepath,
                    os.path.join(self.temp_dir.name, 'ordination.txt'))
        format = OrdinationDirectoryFormat(self.temp_dir.name, mode='r')

        format.validate()

    def test_m2_stats_fmt_positive(self):
        filepath = self.get_data_path('m2stats-999-permus.tsv')
        format = ProcrustesStatisticsFmt(filepath, mode='r')

        format.validate(level='max')

        # If we made it this far, congrats!
        self.assertTrue(True)

    def test_m2_stats_dir_fmt_positive(self):
        filepath = self.get_data_path('m2stats-999-permus.tsv')
        shutil.copy(filepath,
                    os.path.join(self.temp_dir.name,
                                 'ProcrustesStatistics.tsv'))
        format = ProcrustesStatisticsDirFmt(self.temp_dir.name, mode='r')

        format.validate(level='max')

        # If we made it this far, congrats!
        self.assertTrue(True)


if __name__ == "__main__":

# 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

        filepath = self.get_data_path('pcoa-results-NxN.txt')
        shutil.copy(filepath,
                    os.path.join(self.temp_dir.name, 'ordination.txt'))
        format = OrdinationDirectoryFormat(self.temp_dir.name, mode='r')

        format.validate()

    def test_m2_stats_fmt_positive(self):
        filepath = self.get_data_path('m2stats-999-permus.tsv')
        format = ProcrustesStatisticsFmt(filepath, mode='r')

        format.validate(level='max')

        # If we made it this far, congrats!
        self.assertTrue(True)

    def test_m2_stats_dir_fmt_positive(self):
        filepath = self.get_data_path('m2stats-999-permus.tsv')
        shutil.copy(filepath,
                    os.path.join(self.temp_dir.name,
                                 'ProcrustesStatistics.tsv'))
        format = ProcrustesStatisticsDirFmt(self.temp_dir.name, mode='r')

        format.validate(level='max')

        # If we made it this far, congrats!
        self.assertTrue(True)


if __name__ == "__main__":

    unittest.main()