File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 44from pathlib import Path
55
66import pandas as pd
7+ import pytest
78
8- from bedrock_ge .gi .ags .read import ags4_to_dfs
9+ from bedrock_ge .gi .ags .read import ags4_to_dfs , detect_encoding
910
1011data_dir = Path (__file__ ).parent / "data"
1112
@@ -26,8 +27,8 @@ def test_ags4_to_dfs():
2627
2728
2829def test_detect_encoding ():
29- ags3 = fixtures_dir / "ags3_sample.ags"
30- ags4 = fixtures_dir / "ags4_sample.ags"
30+ ags3 = data_dir / "ags3_sample.ags"
31+ ags4 = data_dir / "ags4_sample.ags"
3132
3233 default_encoding = "utf-8"
3334 ags4_encoding = "ISO-8859-1"
@@ -69,12 +70,12 @@ def test_detect_encoding():
6970 assert expected == result
7071
7172 # test non-existent file
72- non_existent = fixtures_dir / "empty.ags"
73+ non_existent = data_dir / "empty.ags"
7374 with pytest .raises (FileNotFoundError ):
7475 detect_encoding (non_existent )
7576
7677 # test empty file (should still return default encoding)
77- empty = fixtures_dir / "empty.ags"
78+ empty = data_dir / "empty.ags"
7879 empty .touch ()
7980 expected = default_encoding
8081 result = detect_encoding (empty )
You can’t perform that action at this time.
0 commit comments