Contents Menu Expand
Logo
Flyte
Getting Started
User Guide
Tutorials
Concepts
Integrations
Deployment
API Reference
Community
flyte.org
Logo
Flyte
  • Getting Started
  • User Guide
  • Tutorials
  • Concepts
  • Deployment
  • API Reference
  • Community

User Guide

  • User Guide
  • Environment Setup
  • Basics
    • Hello World
    • Tasks
    • Workflows
    • Imperative Workflows
    • Add Docstrings to Workflows
    • Launch Plans
    • Caching
    • Run Bash Scripts Using ShellTask
    • Reference Task
    • Working With Files
    • Working With Folders
    • Named Outputs
    • Decorating Tasks
    • Decorating Workflows
    • Cache Serializing
  • Control Flow
    • Conditions
    • Chain Flyte Tasks
    • Subworkflows
    • Dynamic Workflows
    • Map Tasks
    • Intratask Checkpoints
    • Implementing Merge Sort
  • Type System
    • Flyte and Python Types
    • Using Schemas
    • Using Custom Python Objects
    • Using Enum types
    • Typed Columns in a Schema
    • Structured Dataset
    • Using Flyte Pickle
  • Testing
    • Mock Tasks for Testing
  • Containerization
    • Using Raw Containers
    • Multiple Container Images in a Single Workflow
    • Using Secrets in a Task
    • Secret Discovery
    • Configuring a secret management system plugin into use
    • Using Spot/Preemptible Instances
    • Adding Workflow Labels and Annotations
  • Remote Access
    • Creating a New Project
    • Running a Task
    • Running a Workflow
    • Running a Launchplan
    • Inspecting Workflow and Task Executions
    • Debugging Workflow and Task Executions
  • Production Config
    • Deploying Workflows - Registration
    • Customizing Task Resources
    • Notifications
    • Configuring Logging Links in UI
    • Configuring Flyte to Access GPUs
  • Scheduling Workflows
    • Scheduling Workflows Example
  • Extending Flyte
    • Writing Backend Extensions
    • Writing Custom Flyte Types
    • Writing Your Own Flytekit Task Plugins
    • Container Interface
  • Building Large Apps
    • Setup a Project
    • Deploy to the Cloud
    • Iterate and Re-deploy
  • Flytesnacks Contribution Guide

Tutorials

  • Tutorials
  • ML Training
    • Diabetes Classification
      • Train and Validate a Diabetes Classification XGBoost Model
    • House Price Regression
      • Predicting House Price in a Region Using XGBoost
      • Predicting House Price in Multiple Regions Using XGBoost and Dynamic Workflows
    • MNIST Classification With PyTorch and W&B
      • Single Node, Single GPU Training
      • Single Node, Multi GPU Training
    • Forecasting Rossman Store Sales with Horovod and Spark
      • Data-Parallel Distributed Training Using Horovod on Spark
  • Feature Engineering
    • EDA, Feature Engineering, and Modeling With Papermill
      • Flyte Pipeline in One Jupyter Notebook
      • EDA and Feature Engineering in Jupyter Notebook and Modeling in a Flyte Task
      • EDA and Feature Engineering in One Jupyter Notebook and Modeling in the Other
    • Feast Integration
      • Feature Engineering Tasks
      • Feature Store Dataclass
      • Flyte Pipeline With Feast
  • Bioinformatics
    • Nucleotide Sequence Querying with BLASTX
      • BLASTX Example
  • Flytelab
    • Weather Forecasting
      • Github Repo
      • Blog Post

Integrations

  • Integrations
  • SQL
    • Sqlite3
    • SQLAlchemy
  • Great Expectations
    • Task Example
    • Type Example
  • Papermill
    • Jupyter Notebook Tasks
  • Pandera
    • Basic Schema Example
    • Validating and Testing Machine Learning Pipelines
  • Modin
    • KNN Classifier
  • Dolt
    • Quickstart
    • Dolt Branches
  • Kubernetes Pods
    • Pod Example
  • Kubernetes Spark Jobs
    • Writing a PySpark Task
    • Converting a Spark DataFrame to a Pandas DataFrame
  • Kubeflow Pytorch
    • Distributed Pytorch
  • Kubeflow TensorFlow
    • Distributed TensorFlow Training
  • MPI Operator
    • MPIJob Example
  • AWS Sagemaker Training
    • Built-in Sagemaker Algorithms
    • Custom Sagemaker Algorithms
  • AWS Sagemaker Pytorch
    • Distributed Pytorch on Sagemaker
  • AWS Athena
    • Athena Query
  • Hive
    • Hive Tasks
  • Snowflake
    • Snowflake Query
  • BigQuery
    • BigQuery Query

Testing Flyte Tasks and Workflows¶

The flytekit python SDK provides a few utilities for making it easier to test your tasks and workflows in your test suite. For more details, you can also refer to the testing module in the API reference.

Mock Tasks for Testing

Mock Tasks for Testing¶

Download all examples in Python source code: testing_python.zip

Download all examples in Jupyter notebooks: testing_jupyter.zip

Gallery generated by Sphinx-Gallery

Next
Mock Tasks for Testing
Previous
Using Flyte Pickle
Copyright © 2021, Flyte | Built with Sphinx and the Furo theme. | Show Source | Edit on Github