Python Packages
TesmonLang allows you to install and use Python packages in your tests. This can be useful for leveraging existing Python libraries or adding additional functionality to your tests that are unavailable natively in the TesmonLang.
To use a Python package in your Tesmon tests, you need to follow these steps:
- Create a file named
requirements.txt
at the root level of your Tesmon project. More details on requirements.txt syntax - Update your Tesmon
tesmon.config.yml
file to include the requirements.txt file. More details on tesmon.config.yml syntax - Add the name of the Python package you want to use in your tests to the requirements.txt file. You can include the exact package version if you want to ensure a specific version is installed or omit the version to use the latest available version.
After completing these steps, Tesmon will automatically install the specified Python package and make it available in your tests. You can import and use the package's functionality in your tests. This allows you to easily incorporate existing Python libraries or add custom functionality to your tests using Python code.