Skip to content

Commit

Permalink
devel/py-apscheduler: drop all pytest workarounds after 2ada39d
Browse files Browse the repository at this point in the history
______________________________________________ TestProcessJobs.test_nonexistent_executor _______________________________________________

self = <tests.test_schedulers.TestProcessJobs object at 0x878ac2880>
scheduler = <tests.test_schedulers.DummyScheduler object at 0x895538460>, jobstore = <MagicMock spec='BaseJobStore' id='36865062272'>
caplog = <_pytest.logging.LogCaptureFixture object at 0x89480f130>

    def test_nonexistent_executor(self, scheduler, jobstore, caplog):
        """
        Test that an error is logged and the job is removed from its job store if its executor is
        not found.

        """
>       caplog.setLevel(logging.ERROR)
E       AttributeError: 'LogCaptureFixture' object has no attribute 'setLevel'

tests/test_schedulers.py:813: AttributeError
______________________________________________ TestProcessJobs.test_max_instances_reached ______________________________________________

self = <tests.test_schedulers.TestProcessJobs object at 0x878ac2a30>
scheduler = <tests.test_schedulers.DummyScheduler object at 0x893c45460>, job = <MagicMock spec='Job' id='36851155008'>
jobstore = <MagicMock spec='BaseJobStore' id='36838894800'>, executor = <MagicMock spec='BaseExecutor' id='36851346448'>
caplog = <_pytest.logging.LogCaptureFixture object at 0x893c4b940>

    def test_max_instances_reached(self, scheduler, job, jobstore, executor, caplog):
        """Tests that a warning is logged when the maximum instances of a job is reached."""
>       caplog.setLevel(logging.WARNING)
E       AttributeError: 'LogCaptureFixture' object has no attribute 'setLevel'

tests/test_schedulers.py:824: AttributeError
_________________________________________________ TestProcessJobs.test_executor_error __________________________________________________

self = <tests.test_schedulers.TestProcessJobs object at 0x878ac2c10>
scheduler = <tests.test_schedulers.DummyScheduler object at 0x89482ea00>, jobstore = <MagicMock spec='BaseJobStore' id='36865031376'>
executor = <MagicMock spec='BaseExecutor' id='36865028928'>, caplog = <_pytest.logging.LogCaptureFixture object at 0x895534ac0>

    def test_executor_error(self, scheduler, jobstore, executor, caplog):
        """Tests that if any exception is raised in executor.submit(), it is logged."""
>       caplog.setLevel(logging.ERROR)
E       AttributeError: 'LogCaptureFixture' object has no attribute 'setLevel'

tests/test_schedulers.py:834: AttributeError
  • Loading branch information
jbeich committed Jun 4, 2022
1 parent 2d5a6c7 commit 74ca63e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions devel/py-apscheduler/Makefile
Expand Up @@ -24,14 +24,6 @@ USES= python:3.6+
USE_PYTHON= autoplist distutils
TEST_ENV= ${MAKE_ENV} TZ=UTC

post-patch:
@${REINPLACE_CMD} -e 's/ --cov//' ${WRKSRC}/${PYSETUP:R}.cfg
@${REINPLACE_CMD} -e 's/set_level/setLevel/' \
-e 's/\.records/&()/' \
-e '/records/s/== 1/== 2/' \
-e '/message/s/\[0]./[1]./' \
${WRKSRC}/tests/test_schedulers.py

do-test:
@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)

Expand Down

0 comments on commit 74ca63e

Please sign in to comment.