Skip to content

Conversation

funbringer
Copy link
Collaborator

@funbringer funbringer commented Feb 21, 2018

The main idea is to allow user to have several global configs stored in some stack. It's also possible to temporarily change global config using context manager called scoped_config.

  • Renamed TestgresConfig class to GlobalConfig;
  • Added object TestgresConfig for compatibility (== testgres_config).
  • Added functions: push_config(), pop_config(), scoped_config().
  • Small refactoring in relevant modules.

@funbringer funbringer requested a review from ildus February 21, 2018 09:19
@codecov-io
Copy link

codecov-io commented Feb 21, 2018

Codecov Report

Merging #34 into master will decrease coverage by 0.02%.
The diff coverage is 97.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
- Coverage   97.26%   97.24%   -0.03%     
==========================================
  Files          13       13              
  Lines        1098     1162      +64     
==========================================
+ Hits         1068     1130      +62     
- Misses         30       32       +2
Impacted Files Coverage Δ
testgres/consts.py 100% <ø> (ø) ⬆️
testgres/node.py 97.55% <100%> (-0.01%) ⬇️
testgres/exceptions.py 100% <100%> (ø) ⬆️
testgres/cache.py 90.9% <100%> (+1.25%) ⬆️
testgres/__init__.py 100% <100%> (ø) ⬆️
testgres/utils.py 97.82% <100%> (+0.01%) ⬆️
testgres/config.py 97.01% <96.61%> (-2.99%) ⬇️
tests/test_simple.py 99.72% <97.56%> (-0.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 740b8d8...3378f28. Read the comment docs.

@funbringer funbringer merged commit d800f48 into postgrespro:master Feb 21, 2018
@funbringer
Copy link
Collaborator Author

@stalkerg maybe you could take a look at the code and share your opinion.

@stalkerg
Copy link
Contributor

In my opinion, the code is good and it's can help to users in this case but I am not sure because all this user can do in his own test (get global config and return back after a while).
Right now I don't know your cases very well and if it really can help this means everything fine but we should be careful, we can make fat tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants