66
77import pytest # noqa: E402
88
9+ from populus import Project # noqa: E402
10+
911
1012@pytest .fixture ()
1113def temporary_dir (tmpdir ):
@@ -17,17 +19,19 @@ def temporary_dir(tmpdir):
1719def project_dir (tmpdir , monkeypatch ):
1820 from populus .utils .filesystem import (
1921 ensure_path_exists ,
20- get_contracts_dir ,
21- get_build_dir ,
22- get_blockchains_dir ,
22+ )
23+ from populus .utils .contracts import (
24+ get_contracts_source_dir ,
25+ )
26+ from populus .utils .chains import (
27+ get_base_blockchain_storage_dir ,
2328 )
2429
2530 _project_dir = str (tmpdir .mkdir ("project-dir" ))
2631
2732 # setup project directories
28- ensure_path_exists (get_contracts_dir (_project_dir ))
29- ensure_path_exists (get_build_dir (_project_dir ))
30- ensure_path_exists (get_blockchains_dir (_project_dir ))
33+ ensure_path_exists (get_contracts_source_dir (_project_dir ))
34+ ensure_path_exists (get_base_blockchain_storage_dir (_project_dir ))
3135
3236 monkeypatch .chdir (_project_dir )
3337 monkeypatch .syspath_prepend (_project_dir )
@@ -49,3 +53,13 @@ def _write_project_file(filename, content=''):
4953 with open (full_path , 'w' ) as f :
5054 f .write (content )
5155 return _write_project_file
56+
57+
58+ @pytest .fixture ()
59+ def populus_source_root ():
60+ return os .path .dirname (__file__ )
61+
62+
63+ @pytest .fixture ()
64+ def project (project_dir ):
65+ return Project ()
0 commit comments