File tree Expand file tree Collapse file tree 2 files changed +6
-22
lines changed
Expand file tree Collapse file tree 2 files changed +6
-22
lines changed Original file line number Diff line number Diff line change 77# ensure that the parent directory is on the path for relative imports
88sys .path .append (os .path .join (os .path .dirname (__file__ ), ".." , ".." ))
99
10+ os .environ ["ARTICLE_RELEVANCE_BATCH" ] = "article-relevance-output.parquet"
11+ os .environ ["ENTITY_EXTRACTION_BATCH" ] = "entity-extraction-output.zip"
12+
1013from src .data_review_tool .app import *
1114from src .data_review_tool .pages .article_review import *
1215
@@ -22,20 +25,6 @@ def test_cell_clicked():
2225 assert cell_clicked (0 ) == dash .no_update
2326
2427
25- def test_directory_structure ():
26- "Test that the directory structure is as expected."
27- dir = "data/data-review-tool"
28- expected = ["processed" , "raw" ]
29- assert expected [0 ] in os .listdir (dir ) and expected [1 ] in os .listdir (dir )
30-
31-
32- def test_find_start_end_char ():
33- "Test that the find_start_end_char function returns the correct values."
34- text = "This is a test"
35- entity = "test"
36- assert find_start_end_char (text , entity ) == (10 , 14 )
37-
38-
3928def test_update_button ():
4029 "Test that the update_button function returns correct children for Delete or Restore."
4130 assert update_button (True )[0 ].children == "Delete Entity"
Original file line number Diff line number Diff line change 1010
1111sys .path .append (os .path .join (os .path .dirname (__file__ ), ".." , ".." ))
1212
13+ os .environ ["ARTICLE_RELEVANCE_BATCH" ] = "article-relevance-output.parquet"
14+ os .environ ["ENTITY_EXTRACTION_BATCH" ] = "entity-extraction-output.zip"
15+
1316# Import the names of callback functions you want to test
1417from src .data_review_tool .app import *
1518from src .data_review_tool .pages .home import *
1619from src .data_review_tool .pages .config import *
1720
1821
19- def test_directory_structure ():
20- "test that the data directory structure is correct"
21- dir = "data/data-review-tool"
22- expected = ["processed" , "raw" ]
23-
24- assert expected [0 ] in os .listdir (dir ) and expected [1 ] in os .listdir (dir )
25-
26-
2722def test_current_article_clicked ():
2823 "test that clicking 'Review' button redirects to the correct article"
2924 active_cell_current = AttributeDict ({"row" : 0 , "column_id" : "Review" })
You can’t perform that action at this time.
0 commit comments