# anytraverser (c) by chacha # # anytraverser is licensed under a # Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Unported License. # # You should have received a copy of the license along with this # work. If not, see . import unittest from os import chdir from io import StringIO from contextlib import redirect_stdout, redirect_stderr from pathlib import Path print(__name__) print(__package__) from src import anytraverser testdir_path = Path(__file__).parent.resolve() chdir(testdir_path.parent.resolve()) class Testtest_module(unittest.TestCase): def setUp(self) -> None: chdir(testdir_path.parent.resolve()) def test_version(self): ann = list[int | str | list[int | float]] value = [1, "un", 2, "deux", [1, 2, "q"]] trig = anytraverser.DataValidation(value) walker = anytraverser.walkers.annotation_walker.AnnotationWalker(ann, (trig,)) walker.run()