Comments (6)
@grandquista @mehaase Can we close this issue?
from rethinkdb-python.
The first issue is resolve in this commit (now on master): 96b991c
But the second and third issues are not resolved. What do you think @gabor-boros @grandquista?
from rethinkdb-python.
I will look at removing the call for the second issue. The third is a symptom of trying to get a handle on how exceptions were used internally. When we started this refactor there were a number of places that swallowed all exceptions. Or simply caught a re raised.
Sent with GitHawk
from rethinkdb-python.
The second issue is solved. At the same time I namespaced our logger to help moving forward. For the third I think we want to ensure all our logging is done at the DEBUG
level. I'm basing this on Django where turning up to that level gets me all the Postgres events. Write to console is mostly for ease of testing. It could be replaced with a good set of mock utilities.
from rethinkdb-python.
Thanks @grandquista for working on the second issue!
For the third I think we want to ensure all our logging is done at the DEBUG level.
Agreed.
Write to console is mostly for ease of testing. It could be replaced with a good set of mock utilities.
Can you explain this a bit more? Pytest will automatically display log messages for all failing test cases. Here's an example:
import logging
logger = logging.getLogger()
def test_always_passes():
logger.debug('this test always passes')
assert True
def test_always_fails():
logger.debug('this test always fails')
assert False
Pytest can be configured to display debug logs:
> pytest test_foo.py --log-level debug
============================ test session starts ============================
platform linux -- Python 3.6.7, pytest-4.2.0, py-1.8.0, pluggy-0.9.0
rootdir: /home/mhaase/code/hyperiongray/rethinkdb-python, inifile: setup.cfg
plugins: cov-2.6.1
collected 2 items
test_foo.py .F [100%]
================================= FAILURES ==================================
_____________________________ test_always_fails _____________________________
def test_always_fails():
logger.debug('this test always fails')
> assert False
E assert False
test_foo.py:11: AssertionError
----------------------------- Captured log call -----------------------------
test_foo.py 10 DEBUG this test always fails
===================== 1 failed, 1 passed in 0.03 seconds ====================
Or did I misunderstand the comment about testing?
from rethinkdb-python.
Can you explain this a bit more?
As you mentioned, only for failing cases. Sometimes output from successful tests was important.
It is mostly an internal duplication of tee
, and was helpful during large scale refactoring.
from rethinkdb-python.
Related Issues (20)
- Proposal: Disconnect connection when garbage collected HOT 1
- Python driver fails with unexpected bytes
- Restore not working on Windows due to : (colon) in file and folder names HOT 4
- Python driver incorrectly requires datetime.date type to have tzinfo
- add rate limiting to export and dump commands
- Adding `async` and `await` support for Python 3.5 HOT 20
- Python driver: auto reconnect options? HOT 1
- 'JsonSourceFile' object has no attribute 'bytes_processed' when using restore HOT 1
- Encountering primary key error while running rethinkdb restore for rethinkdb 2.4 version HOT 5
- Typing and docstring support for better IDE experience HOT 1
- Continuous integration and code coverage checks
- Python3.11 compatibility HOT 3
- asyncio deprecated '@asyncio.coroutine' in python 3.11 HOT 3
- Python 3.11 gets error "module ' asyncio' has no attribute 'coroutine'" HOT 1
- Python 3.12 breakage: The distutils module is removed
- 2.4.10 release HOT 10
- Fix wait_closed dependency on Python <3.7
- _restore not handling -i DB.TABLE
- ModuleNotFoundError: No module named 'looseversion' HOT 1
- 2.4.11 Realease HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rethinkdb-python.