|
1 | 1 | import pandas as pd |
2 | 2 |
|
3 | | -from sdv.datasets.demo import get_available_demos, get_readme, get_source |
| 3 | +from sdv.datasets.demo import get_available_demos |
4 | 4 |
|
5 | 5 |
|
6 | 6 | def test_get_available_demos_single_table(): |
@@ -85,30 +85,3 @@ def test_get_available_demos_multi_table(): |
85 | 85 | 'num_tables': [2, 2], |
86 | 86 | }) |
87 | 87 | pd.testing.assert_frame_equal(tables_info[['dataset_name', 'size_MB', 'num_tables']], expected) |
88 | | - |
89 | | - |
90 | | -def test_get_readme_and_source_single_table_dataset1(tmp_path): |
91 | | - """Test it returns the README and SOURCE for a single table dataset.""" |
92 | | - # Run |
93 | | - readme = get_readme('single_table', 'dataset1') |
94 | | - source = get_source('single_table', 'dataset1') |
95 | | - |
96 | | - # Assert |
97 | | - assert isinstance(readme, str) and 'sample dataset' in readme.lower() |
98 | | - assert isinstance(source, str) and source.strip() == 'unknown' |
99 | | - |
100 | | - readme_out = tmp_path / 'r.txt' |
101 | | - source_out = tmp_path / 's.txt' |
102 | | - readme2 = get_readme('single_table', 'dataset1', str(readme_out)) |
103 | | - source2 = get_source('single_table', 'dataset1', str(source_out)) |
104 | | - assert readme2 == readme |
105 | | - assert source2 == source |
106 | | - assert readme_out.read_text(encoding='utf-8').strip() == readme.strip() |
107 | | - assert source_out.read_text(encoding='utf-8').strip() == source.strip() |
108 | | - |
109 | | - |
110 | | -def test_get_readme_missing_returns_none(): |
111 | | - """Test it returns None when the README/SOURCE is missing.""" |
112 | | - # Run and Assert |
113 | | - assert get_readme('single_table', 'dataset2') is None |
114 | | - assert get_source('single_table', 'dataset2') is None |
0 commit comments