File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " workflowai"
3- version = " 0.3.3 "
3+ version = " 0.3.4 "
44description = " "
55authors = [" Guillaume Aquilina <guillaume@workflowai.com>" ]
66readme = " README.md"
Original file line number Diff line number Diff line change 11from workflowai .core .fields .chat_message import ChatMessage as ChatMessage
22from workflowai .core .fields .email_address import EmailAddressStr as EmailAddressStr
3+ from workflowai .core .fields .file import File as File
34from workflowai .core .fields .html_string import HTMLString as HTMLString
45from workflowai .core .fields .http_url import HttpUrl as HttpUrl
56from workflowai .core .fields .image import Image as Image
Original file line number Diff line number Diff line change 1+ import os
2+
3+ from workflowai import fields
4+
5+
6+ def test_exported_fields_match_core_fields ():
7+ # Get the number of exported fields in fields.py
8+ exported_fields = {attr for attr in dir (fields ) if not attr .startswith ("_" )}
9+
10+ # Get the number of files in workflowai/core/fields
11+ core_fields_dir = os .path .join (os .path .dirname (__file__ ), "core" , "fields" )
12+ core_field_files = {
13+ "" .join (word .capitalize () for word in f .removesuffix (".py" ).split ("_" ))
14+ for f in os .listdir (core_fields_dir )
15+ if f .endswith (".py" ) and f != "__init__.py" and not f .endswith ("_test.py" )
16+ }
17+
18+ assert len (core_field_files ) == len (exported_fields )
You can’t perform that action at this time.
0 commit comments