Skip to content

Commit

Permalink
bugfix: preserve pytest rootdir when project is inside another python…
Browse files Browse the repository at this point in the history
… project
  • Loading branch information
iamdefinitelyahuman committed Jan 21, 2020
1 parent c1c14cd commit fab7721
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions brownie/test/managers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import json
from hashlib import sha1

from py.path import local

from brownie._config import ARGV, CONFIG
from brownie.project.scripts import _get_ast_hash
from brownie.test import coverage, output
Expand All @@ -14,8 +16,12 @@ class PytestBrownieBase:
def __init__(self, config, project):

self.config = config
# required when brownie project is in a subfolder of another project
config.rootdir = local(project._path)

self.project = project
self.project_path = project._path

self.results = {}
self.node_map = {}
self.isolated = {}
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ eth-hash[pycryptodome]==0.2.0
eth-utils==1.8.0
hexbytes==0.2.0
psutil>=5.6.2,<6.0.0
py>=1.5.0
pyreadline==2.1;platform_system=='Windows'
py-solc-ast>=1.1.0,<2.0.0
py-solc-x>=0.7.1,<1.0.0
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ignore = E203,W503
force_grid_wrap = 0
include_trailing_comma = True
known_first_party = brownie
known_third_party = _pytest,docopt,ens,eth_abi,eth_event,eth_hash,eth_keys,eth_utils,ethpm,hexbytes,mythx_models,psutil,pytest,pythx,requests,semantic_version,setuptools,solcast,solcx,tqdm,vyper,web3,xdist,yaml
known_third_party = _pytest,docopt,ens,eth_abi,eth_event,eth_hash,eth_keys,eth_utils,ethpm,hexbytes,mythx_models,psutil,py,pytest,pythx,requests,semantic_version,setuptools,solcast,solcx,tqdm,vyper,web3,xdist,yaml
line_length = 100
multi_line_output = 3
use_parentheses = True
Expand Down

0 comments on commit fab7721

Please sign in to comment.