Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

test_config.py 345 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  1. import pytest
  2. class NotInRange(Exception):
  3. def __init__(self,msg="value not in range"):
  4. self.msg=msg
  5. super().__init__(self.msg)
  6. def test_fuct():
  7. a=3
  8. with pytest.raises(NotInRange):
  9. if a not in range(10,20):
  10. raise NotInRange
  11. def test_generic():
  12. a=2
  13. b=2
  14. assert a==b
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...