cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pytest on Notebook

vinayaka_pallak
New Contributor

 

I am currently exploring testing methodologies for Databricks notebooks and would like to inquire whether it's possible to write pytest tests for notebooks that contain code not encapsulated within functions or classes.
***********************
a = 4
b = 5
print(a + b)
***********************

Given this scenario, I am interested in understanding whether it's feasible to write pytest tests to validate the functionality of such code blocks within Databricks notebooks.

Any insights or guidance you could provide on this matter would be greatly appreciated.

NOTE: we should not touch the notebook code.
if we can able to just write a test case for the above code.

 

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group