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

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now