Skip to content

Commit bb30904

Browse files
committed
[test/validation_integration] Add test file
1 parent bff325c commit bb30904

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""
2+
This file tests built-in odml validations.
3+
"""
4+
5+
import sys
6+
import unittest
7+
8+
try:
9+
from StringIO import StringIO
10+
except ImportError:
11+
from io import StringIO
12+
13+
import odml
14+
15+
16+
class TestValidationIntegration(unittest.TestCase):
17+
18+
def setUp(self):
19+
# Redirect stdout to test messages
20+
self.capture = StringIO()
21+
sys.stdout = self.capture
22+
23+
self.msg_base = "Property values cardinality violated"
24+
25+
def tearDown(self):
26+
# Reset stdout
27+
sys.stdout = sys.__stdout__
28+

0 commit comments

Comments
 (0)