Comments (2)
pytest seems still is failing but now I have onlty one failing unit
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-logbook-1.5.3-9.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-logbook-1.5.3-9.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
824545:C 13 Jan 2022 14:00:57.469 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
824545:C 13 Jan 2022 14:00:57.469 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=824545, just started
824545:C 13 Jan 2022 14:00:57.469 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
824545:M 13 Jan 2022 14:00:57.470 * Increased maximum number of open files to 10032 (it was originally set to 1024).
824545:M 13 Jan 2022 14:00:57.470 * monotonic clock: POSIX clock_gettime
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 6.2.6 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 824545
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | https://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
824545:M 13 Jan 2022 14:00:57.471 # Server initialized
824545:M 13 Jan 2022 14:00:57.472 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
824545:M 13 Jan 2022 14:00:57.473 * Ready to accept connections
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/logbook-1.5.3
collected 213 items
tests/test_asyncio.py . [ 0%]
tests/test_ci.py ss [ 1%]
tests/test_deadlock.py . [ 1%]
tests/test_file_handler.py ................................ [ 16%]
tests/test_fingers_crossed_handler.py ...... [ 19%]
tests/test_flags.py .. [ 20%]
tests/test_groups.py .. [ 21%]
tests/test_handler_errors.py ... [ 23%]
tests/test_handlers.py ........... [ 28%]
tests/test_helpers.py .. [ 29%]
tests/test_log_record.py .......... [ 33%]
tests/test_logbook.py ... [ 35%]
tests/test_logger.py ... [ 36%]
tests/test_logging_api.py ............. [ 42%]
tests/test_logging_compat.py .... [ 44%]
tests/test_logging_times.py ss... [ 46%]
tests/test_mail_handler.py ....... [ 50%]
tests/test_more.py .........sss [ 55%]
tests/test_nteventlog_handler.py s [ 56%]
tests/test_null_handler.py ...... [ 59%]
tests/test_processors.py .... [ 61%]
tests/test_queues.py .........s.... [ 67%]
tests/test_syslog_handler.py ............ [ 73%]
tests/test_test_handler.py .............................. [ 87%]
tests/test_ticketing.py F [ 87%]
tests/test_unicode.py ....... [ 91%]
tests/test_utils.py ................... [100%]
================================================================================= FAILURES =================================================================================
___________________________________________________________________________ test_basic_ticketing ___________________________________________________________________________
logger = <logbook.base.Logger object at 0x7f75f9821a00>
@pytest.mark.xfail(
os.name == 'nt' and (python_version == (3, 2) or python_version == (3, 3)),
reason='Problem with in-memory sqlite on Python 3.2, 3.3 and Windows')
@require_module('sqlalchemy')
def test_basic_ticketing(logger):
from logbook.ticketing import TicketingHandler
from time import sleep
with TicketingHandler('sqlite:///') as handler:
for x in xrange(5):
logger.warn('A warning')
sleep(0.2)
logger.info('An error')
sleep(0.2)
if x < 2:
try:
1 / 0
except Exception:
logger.exception()
> assert handler.db.count_tickets() == 3
tests/test_ticketing.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <logbook.ticketing.SQLAlchemyBackend object at 0x7f75f98211c0>
def count_tickets(self):
"""Returns the number of tickets."""
> return self.engine.execute(self.tickets.count()).fetchone()[0]
E AttributeError: 'Table' object has no attribute 'count'
logbook/ticketing.py:246: AttributeError
============================================================================= warnings summary =============================================================================
tests/test_queues.py::test_missing_zeromq
/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function ZeroMQHandler.__del__ at 0x7f75f9771940>
Traceback (most recent call last):
File "/home/tkloczko/rpmbuild/BUILD/logbook-1.5.3/logbook/queues.py", line 241, in __del__
self.close(linger=100)
File "/home/tkloczko/rpmbuild/BUILD/logbook-1.5.3/logbook/queues.py", line 232, in close
self.socket.close(linger)
AttributeError: 'ZeroMQHandler' object has no attribute 'socket'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
tests/test_ticketing.py::test_basic_ticketing
/home/tkloczko/rpmbuild/BUILD/logbook-1.5.3/logbook/ticketing.py:147: SADeprecationWarning: The create_engine.convert_unicode parameter and corresponding dialect-level parameters are deprecated, and will be removed in a future release. Modern DBAPIs support Python Unicode natively and this parameter is unnecessary.
self.engine = create_engine(engine_or_uri, convert_unicode=True,
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_ci.py:8: AppVeyor CI test
SKIPPED [1] tests/test_ci.py:16: Travis CI test
SKIPPED [2] tests/test_logging_times.py:35: Cannot test utc/localtime differences if they vary by less than one minute...
SKIPPED [1] tests/test_more.py:166: Module riemann_client is required
SKIPPED [1] tests/test_more.py:189: Module riemann_client is required
SKIPPED [1] tests/test_more.py:195: Module riemann_client is required
SKIPPED [1] tests/test_nteventlog_handler.py:9: Don't clutter NT Event Log unless enabled.
SKIPPED [1] tests/test_queues.py:166: Module execnet is required
FAILED tests/test_ticketing.py::test_basic_ticketing - AttributeError: 'Table' object has no attribute 'count'
========================================================== 1 failed, 203 passed, 9 skipped, 2 warnings in 13.95s ===========================================================
from logbook.
Resolved by #331
from logbook.
Related Issues (20)
- Usage of deprecated API of SQLAlchemy - FromClause.count HOT 2
- TicketingHandler MySQL 8.0 encode warning
- Any good reason why milliseconds are drop when redirect to logging?
- cython is not run when the library is installed using easy_install / pip HOT 1
- Brotli support does not work if brotlipy is installed HOT 2
- The package falls apart if contextvars are installed HOT 1
- test_asyncio_context_management[True] fails w/ py3.7+ if gevent is installed HOT 2
- TimedRotatingFileHandler append in local time
- Add an enumeration for log levels?
- Is this project still active? HOT 1
- 1.5.3: sphinx warnings HOT 2
- 1.5.3: pep517 build issue HOT 5
- Type annotations needed.
- Does this do logging without blocking the calling thread? HOT 1
- Building fails with cython 3.0.0 HOT 2
- Deprecate treating naive datetimes as UTC
- Error using Processor as context manager in async method: "popped unexpected object" HOT 6
- Simplify context
- Use of `datetime.utcfromtimestamp()` on 3.12+ is also deprecated HOT 1
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 logbook.