Skip to content
Snippets Groups Projects
Select Git revision
  • 21c2d1a446491f76d6ed56bbed3009c109fe28e8
  • main default protected
  • dev
  • feature-filter
4 results

tests.py

Blame
  • tests.py 962 B
    import unittest
    
    # for testing on local version, instead of installed version,
    # this may not be desired as testing uninstalled may not catch issues that occur after installation is performed
    # comment the next three lines to test installed version
    # import sys
    # from pathlib import Path
    # sys.path.append(str(Path(__file__).resolve().parent / "src"))
    
    from pypelines import examples
    from pypelines.sessions import Session
    
    
    class TestVersions(unittest.TestCase):
        def setUp(self):
            self.pipeline = examples.example_pipeline
            self.session = Session(subject="test_subject", date="2023-10-10", number=0, path="C:/test", auto_path=True)
            print(self.session.alias)
    
        def test_pipeline_generate(self):
            self.assertEqual(
                self.pipeline.ExamplePipe.example_step1.generate(self.session, "bonjour"),
                {"argument1": "bonjour", "optionnal_argument2": 23},
            )
    
    
    if __name__ == "__main__":
        unittest.main()