repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
readthedocs/sphinx-autoapi
import logging import os import pathlib import sys from unittest.mock import Mock, call import autoapi.settings from autoapi._objects import ( PythonClass, PythonData, PythonFunction, PythonMethod, PythonModule, ) from packaging import version import pytest import sphinx from sphinx.application imp...
1
assert
numeric_literal
tests/python/test_pyintegration.py
check_integration
TestSimpleModule
92
null
readthedocs/sphinx-autoapi
import os import pytest class TestClass: def built(self, builder): builder( "pypackageexample", warningiserror=True, confoverrides={ "autoapi_own_page_level": "class", "autoapi_options": [ "members", ...
"This is a class."
assert
string_literal
tests/python/test_own_page_option.py
test_class
TestClass
255
null
readthedocs/sphinx-autoapi
import os import pytest class TestModule: def built(self, builder): builder( "pypackageexample", warningiserror=True, confoverrides={ "autoapi_own_page_level": "module", "autoapi_options": [ "members", ...
["submodule"]
assert
collection
tests/python/test_own_page_option.py
test_rendered_only_expected_pages
TestModule
130
null
readthedocs/sphinx-autoapi
import logging import os import pathlib import sys from unittest.mock import Mock, call import autoapi.settings from autoapi._objects import ( PythonClass, PythonData, PythonFunction, PythonMethod, PythonModule, ) from packaging import version import pytest import sphinx from sphinx.application imp...
"dt"
assert
string_literal
tests/python/test_pyintegration.py
test_overload
TestPy3Module
510
null
readthedocs/sphinx-autoapi
import logging import os import pathlib import sys from unittest.mock import Mock, call import autoapi.settings from autoapi._objects import ( PythonClass, PythonData, PythonFunction, PythonMethod, PythonModule, ) from packaging import version import pytest import sphinx from sphinx.application imp...
": A"
assert
string_literal
tests/python/test_pyintegration.py
test_annotations
TestPy3Module
495
null
readthedocs/sphinx-autoapi
import sys import astroid import pytest from autoapi._parser import Parser class TestPythonParser: def parse(self, source): node = astroid.extract_node(source) return Parser().parse(node) def test_parses_all_multiline(self): source = """ __all__ = [ 'foo', ...
"['foo', 'bar']"
assert
string_literal
tests/python/test_parser.py
test_parses_all_multiline
TestPythonParser
41
null
readthedocs/sphinx-autoapi
import sys import astroid import pytest from autoapi._parser import Parser class TestPythonParser: def parse(self, source): node = astroid.extract_node(source) return Parser().parse(node) def test_parses_all(self): source = """ __all__ = ['Foo', 5.0] """ data ...
"__all__"
assert
string_literal
tests/python/test_parser.py
test_parses_all
TestPythonParser
30
null
readthedocs/sphinx-autoapi
import sys import astroid import pytest from autoapi._parser import Parser class TestPythonParser: def parse(self, source): node = astroid.extract_node(source) return Parser().parse(node) def test_parses_name(self): source = "foo.bar" assert self.parse(source) ==
[]
assert
collection
tests/python/test_parser.py
test_parses_name
TestPythonParser
45
null
readthedocs/sphinx-autoapi
import logging import os import pathlib import sys from unittest.mock import Mock, call import autoapi.settings from autoapi._objects import ( PythonClass, PythonData, PythonFunction, PythonMethod, PythonModule, ) from packaging import version import pytest import sphinx from sphinx.application imp...
"int"
assert
string_literal
tests/python/test_pyintegration.py
test_class
TestSimpleModuleManual
231
null
readthedocs/sphinx-autoapi
import sys import astroid import pytest from autoapi._parser import Parser class TestPythonParser: def parse(self, source): node = astroid.extract_node(source) return Parser().parse(node) def test_list_index_assignment(self): """Ignore assignment to indexes.""" source = """ ...
"COLOUR"
assert
string_literal
tests/python/test_parser.py
test_list_index_assignment
TestPythonParser
129
null
readthedocs/sphinx-autoapi
import sys import astroid import pytest from autoapi._parser import Parser class TestPythonParser: def parse(self, source): node = astroid.extract_node(source) return Parser().parse(node) def test_arguments(self): """Argument parsing of source""" source = ( "def f...
expected
assert
variable
tests/python/test_parser.py
test_arguments
TestPythonParser
80
null
readthedocs/sphinx-autoapi
import sys import astroid import pytest from autoapi._parser import Parser class TestPythonParser: def parse(self, source): node = astroid.extract_node(source) return Parser().parse(node) @pytest.mark.skipif( sys.version_info < (3, 12), reason="Type params are supported in Python 3.1...
1
assert
numeric_literal
tests/python/test_parser.py
test_parses_typeparams
TestPythonParser
144
null
readthedocs/sphinx-autoapi
import sys import astroid import pytest from autoapi._parser import Parser class TestPythonParser: def parse(self, source): node = astroid.extract_node(source) return Parser().parse(node) @pytest.mark.skipif( sys.version_info < (3, 12), reason="Type params are supported in Python 3.1...
data
assert
variable
tests/python/test_parser.py
test_parses_typeparams
TestPythonParser
143
null
readthedocs/sphinx-autoapi
import sys import astroid import pytest from autoapi._parser import Parser class TestPythonParser: def parse(self, source): node = astroid.extract_node(source) return Parser().parse(node) def test_dict_key_assignment(self): """Ignore assignment to dictionary entries.""" sourc...
"MY_DICT"
assert
string_literal
tests/python/test_parser.py
test_dict_key_assignment
TestPythonParser
118
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main import pytest import yaml def test_configs_1(caplog): caplog.set_level(logging.DEBUG) sys.argv = ['mammoth', '--model', 'puridiver', ...
'0.9'
assert
string_literal
tests/test_datasets.py
test_configs_1
160
null
aimagelab/mammoth
import logging import os import sys import pytest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main @pytest.mark.parametrize('backbone', ['resnet18', 'resnet34']) def test_register_backbone_resnet(backbone, caplog): sys.argv = ['mammoth', '--model'...
backbone
assert
variable
tests/test_module_register.py
test_register_backbone_resnet
42
null
aimagelab/mammoth
import logging import os import sys import pytest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main @pytest.mark.parametrize('backbone', ['resnet18', 'resnet34']) def test_register_backbone_resnet(backbone, caplog): sys.argv = ['mammoth', '--model'...
backbone_print[0]
assert
complex_expr
tests/test_module_register.py
test_register_backbone_resnet
47
null
aimagelab/mammoth
import logging import os import sys import pytest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_register_backbone(capsys): from backbone import register_backbone, MammothBackbone @register_backbone('custom-cnn') class CustomCNN(MammothBackbone...
bk_line[0]
assert
complex_expr
tests/test_module_register.py
test_register_backbone
133
null
aimagelab/mammoth
import logging import os import sys import pytest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_dynamic_args_backbone_defaults(caplog): sys.argv = ['mammoth', '--model', 'si', '--dataset', ...
'0.6'
assert
string_literal
tests/test_dynamic_params.py
test_dynamic_args_backbone_defaults
46
null
aimagelab/mammoth
import logging import os import sys import pytest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_dynamic_args_backbone_defaults(caplog): sys.argv = ['mammoth', '--model', 'si', '--dataset', ...
'0.1'
assert
string_literal
tests/test_dynamic_params.py
test_dynamic_args_backbone_defaults
47
null
aimagelab/mammoth
import logging import os import sys import pytest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_register_dataset(capsys): from datasets import register_dataset, ContinualDataset @register_dataset('custom-dataset') class CustomDataset(Continua...
ds_line[0]
assert
complex_expr
tests/test_module_register.py
test_register_dataset
164
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_best_rehearsal(caplog): sys.argv = ['mammoth', '--model', 'ccic', '--dataset', 'seq-cifar10', ...
'4'
assert
string_literal
tests/test_model_config.py
test_best_rehearsal
117
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main import pytest import yaml def test_configs_1(caplog): caplog.set_level(logging.DEBUG) sys.argv = ['mammoth', '--model', 'puridiver', ...
'4'
assert
string_literal
tests/test_datasets.py
test_configs_1
159
null
aimagelab/mammoth
import os import sys import torch sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_der_cifar100_defaultscheduler(caplog): N_TASKS = 10 sys.argv = ['mammoth', '--model', 'der', '--dataset', ...
500
assert
numeric_literal
tests/test_scheduler.py
test_der_cifar100_defaultscheduler
55
null
aimagelab/mammoth
import logging import os import sys import pytest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_dynamic_args_backbone_override(caplog): sys.argv = ['mammoth', '--model', 'si', '--dataset', ...
'1000'
assert
string_literal
tests/test_dynamic_params.py
test_dynamic_args_backbone_override
91
null
aimagelab/mammoth
import os import sys import torch sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_der_cifar100_defaultscheduler(caplog): N_TASKS = 10 sys.argv = ['mammoth', '--model', 'der', '--dataset', ...
ckpt
assert
variable
tests/test_scheduler.py
test_der_cifar100_defaultscheduler
53
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main import pytest import yaml def test_configs_2(caplog): caplog.set_level(logging.DEBUG) sys.argv = ['mammoth', '--model', 'ccic', ...
'5'
assert
string_literal
tests/test_datasets.py
test_configs_2
232
null
aimagelab/mammoth
import os import sys import uuid sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main import pytest @pytest.mark.parametrize('model', ['sgd', 'slca', 'l2p']) @pytest.mark.parametrize('savecheck', ['last', 'task']) @pytest.mark.parametrize('joint', ['0', '1']) def test_chec...
ckpt_path
assert
variable
tests/test_checkpointing.py
test_checkpoint_save_and_load
61
null
aimagelab/mammoth
import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import pytest def test_main_import_rehearsal(caplog): sys.argv = ['mammoth', '--model', 'er-ace', '--dataset', 'seq-cifar10', '--buffer_s...
0
assert
numeric_literal
tests/test_basic_functionality.py
test_main_import_rehearsal
35
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_best_base(caplog, capsys): caplog.set_level(logging.DEBUG) sys.argv = ['mammoth', '--model', 'si', '--dataset', ...
'10'
assert
string_literal
tests/test_model_config.py
test_best_base
161
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_best_base(caplog, capsys): caplog.set_level(logging.DEBUG) sys.argv = ['mammoth', '--model', 'si', '--dataset', ...
'10tasks'
assert
string_literal
tests/test_model_config.py
test_best_base
154
null
aimagelab/mammoth
import os import sys import torch sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_der_cifar100_defaultscheduler(caplog): N_TASKS = 10 sys.argv = ['mammoth', '--model', 'der', '--dataset', ...
0.03
assert
numeric_literal
tests/test_scheduler.py
test_der_cifar100_defaultscheduler
49
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_best_rehearsal(caplog): sys.argv = ['mammoth', '--model', 'ccic', '--dataset', 'seq-cifar10', ...
'0.0001'
assert
string_literal
tests/test_model_config.py
test_best_rehearsal
116
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_best_rehearsal(caplog): sys.argv = ['mammoth', '--model', 'ccic', '--dataset', 'seq-cifar10', ...
'2'
assert
string_literal
tests/test_model_config.py
test_best_rehearsal
119
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main import pytest import yaml def test_configs_2(caplog): caplog.set_level(logging.DEBUG) sys.argv = ['mammoth', '--model', 'ccic', ...
'resnet18'
assert
string_literal
tests/test_datasets.py
test_configs_2
235
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main import pytest import yaml def test_configs_1(caplog): caplog.set_level(logging.DEBUG) sys.argv = ['mammoth', '--model', 'puridiver', ...
"test"
assert
string_literal
tests/test_datasets.py
test_configs_1
141
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main import pytest import yaml def test_configs_1(caplog): caplog.set_level(logging.DEBUG) sys.argv = ['mammoth', '--model', 'puridiver', ...
'strong'
assert
string_literal
tests/test_datasets.py
test_configs_1
162
null
aimagelab/mammoth
import os import sys import torch sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_der_cifar100_customscheduler(caplog): N_TASKS = 10 sys.argv = ['mammoth', '--model', 'der', '--dataset', ...
opt['initial_lr'] * 0.1 * 0.1 * 0.1 * 0.1
assert
complex_expr
tests/test_scheduler.py
test_der_cifar100_customscheduler
102
null
aimagelab/mammoth
import os import sys import logging sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main import pytest import yaml def test_configs_2(caplog): caplog.set_level(logging.DEBUG) sys.argv = ['mammoth', '--model', 'ccic', ...
'adam'
assert
string_literal
tests/test_datasets.py
test_configs_2
233
null
aimagelab/mammoth
import os import sys import torch sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_der_cifar100_customscheduler(caplog): N_TASKS = 10 sys.argv = ['mammoth', '--model', 'der', '--dataset', ...
[2, 4, 6, 8]
assert
collection
tests/test_scheduler.py
test_der_cifar100_customscheduler
103
null
aimagelab/mammoth
import os import sys import torch sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_der_cifar100_defaultscheduler(caplog): N_TASKS = 10 sys.argv = ['mammoth', '--model', 'der', '--dataset', ...
[35, 45]
assert
collection
tests/test_scheduler.py
test_der_cifar100_defaultscheduler
51
null
aimagelab/mammoth
import os import sys import torch sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_der_cifar100_defaultscheduler(caplog): N_TASKS = 10 sys.argv = ['mammoth', '--model', 'der', '--dataset', ...
[0.03]
assert
collection
tests/test_scheduler.py
test_der_cifar100_defaultscheduler
52
null
aimagelab/mammoth
import os import sys import torch sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_der_cifar100_customscheduler(caplog): N_TASKS = 10 sys.argv = ['mammoth', '--model', 'der', '--dataset', ...
[0.1]
assert
collection
tests/test_scheduler.py
test_der_cifar100_customscheduler
104
null
aimagelab/mammoth
import logging import os import sys import pytest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_dynamic_args_backbone_defaults(caplog): sys.argv = ['mammoth', '--model', 'si', '--dataset', ...
hidden_size_print[0]
assert
complex_expr
tests/test_dynamic_params.py
test_dynamic_args_backbone_defaults
52
null
aimagelab/mammoth
import os import sys import torch sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_der_cifar100_customscheduler(caplog): N_TASKS = 10 sys.argv = ['mammoth', '--model', 'der', '--dataset', ...
0.1
assert
numeric_literal
tests/test_scheduler.py
test_der_cifar100_customscheduler
101
null
aimagelab/mammoth
import logging import os import sys import pytest sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from main import main def test_args_with_choices(capsys): sys.argv = ['mammoth', '--model', 'sgd', '--dataset', 'seq-cifar...
SystemExit)
pytest.raises
variable
tests/test_module_register.py
test_args_with_choices
99
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime from zoneinfo import ZoneInfo import pytest from apscheduler.triggers.cron import CronTrigger def test_from_crontab_start_end_time(timezone: ZoneInfo) -> None: start_time = datetime(2020, 5, 19, 19, 53, 22, tzinfo=timezone) end_time = datetime...
start_time
assert
variable
tests/triggers/test_cron.py
test_from_crontab_start_end_time
549
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta, timezone import pytest from apscheduler import MaxIterationsReached from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger from apscheduler.triggers.combining import AndTrigger, OrTrigger from apscheduler.triggers.cron im...
"OrTrigger([DateTrigger('2020-05-16 14:17:30.254212+02:00'), " "DateTrigger('2020-05-18 15:01:53.940564+02:00')])"
assert
string_literal
tests/triggers/test_combining.py
test_repr
TestOrTrigger
207
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timezone from typing import NoReturn from uuid import uuid4 import pytest from apscheduler import ( DeserializationError, Event, JobAdded, JobOutcome, JobReleased, SerializationError, ) from apscheduler.abc import Serializer d...
SerializationError)
pytest.raises
variable
tests/test_serializers.py
test_serialization_error
57
null
agronholm/apscheduler
from __future__ import annotations from datetime import date, datetime import pytest from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger def test_repeated_time(timezone, serializer): """ Test that if the designated time is repeated during a day due to a backward DST shift, the task...
datetime(2016, 10, 30, 2, 30, tzinfo=timezone, fold=0)
assert
func_call
tests/triggers/test_calendarinterval.py
test_repeated_time
67
null
agronholm/apscheduler
from __future__ import annotations from datetime import date, datetime import pytest from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger def test_end_date(timezone, serializer): """Test that end_date is respected.""" start_end_date = date(2020, 12, 31) trigger = CalendarIntervalTri...
start_end_date
assert
variable
tests/triggers/test_calendarinterval.py
test_end_date
36
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime from zoneinfo import ZoneInfo import pytest from apscheduler.triggers.cron import CronTrigger @pytest.mark.parametrize( "expr, expected_repr", [ ( "* * * * *", "CronTrigger(year='*', month='*', day='*', week='*'...
expected_repr
assert
variable
tests/triggers/test_cron.py
test_from_crontab
535
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta import pytest from apscheduler.triggers.interval import IntervalTrigger def test_end_time(timezone, serializer): start_time = datetime(2020, 5, 16, 19, 32, 44, 649521, tzinfo=timezone) end_time = datetime(2020, 5, 16, 22, 33, 1, tzi...
start_time
assert
variable
tests/triggers/test_interval.py
test_end_time
31
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta, timezone import pytest from apscheduler import MaxIterationsReached from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger from apscheduler.triggers.combining import AndTrigger, OrTrigger from apscheduler.triggers.cron im...
start_time + timedelta(seconds=6)
assert
func_call
tests/triggers/test_combining.py
test_two_interval_triggers
TestOrTrigger
194
null
agronholm/apscheduler
from __future__ import annotations import sys from datetime import timedelta from functools import partial from types import ModuleType import pytest from apscheduler import SerializationError from apscheduler._marshalling import callable_from_ref, callable_to_ref class TestCallableToRef: @pytest.mark.parametri...
error
assert
variable
tests/test_marshalling.py
test_errors
TestCallableToRef
50
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timezone from typing import NoReturn from uuid import uuid4 import pytest from apscheduler import ( DeserializationError, Event, JobAdded, JobOutcome, JobReleased, SerializationError, ) from apscheduler.abc import Serializer @...
event
assert
variable
tests/test_serializers.py
test_serialize_event
48
null
agronholm/apscheduler
from __future__ import annotations import platform from collections.abc import AsyncGenerator from contextlib import AsyncExitStack, asynccontextmanager from datetime import datetime, timedelta, timezone from logging import Logger from pathlib import Path from typing import TYPE_CHECKING from unittest.mock import Mock...
3
assert
numeric_literal
tests/test_datastores.py
test_acquire_release_schedules
281
null
agronholm/apscheduler
from __future__ import annotations from datetime import date, datetime import pytest from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger def test_utc_timezone(utc_timezone): trigger = CalendarIntervalTrigger( days=1, hour=1, start_date=date(2016, 3, 31), timezone=utc_timezone )...
datetime(2016, 3, 31, 1, tzinfo=utc_timezone)
assert
func_call
tests/triggers/test_calendarinterval.py
test_utc_timezone
109
null
agronholm/apscheduler
from __future__ import annotations import sys from contextlib import AsyncExitStack from datetime import datetime, timezone from logging import Logger import pytest from _pytest.logging import LogCaptureFixture from anyio import CancelScope, create_memory_object_stream, fail_after from apscheduler import Event, Sche...
event2
assert
variable
tests/test_eventbrokers.py
test_publish_subscribe
39
null
agronholm/apscheduler
from __future__ import annotations import sys from contextlib import AsyncExitStack from datetime import datetime, timezone from logging import Logger import pytest from _pytest.logging import LogCaptureFixture from anyio import CancelScope, create_memory_object_stream, fail_after from apscheduler import Event, Sche...
datetime(2021, 9, 11, 12, 31, 56, 254867, UTC)
assert
func_call
tests/test_eventbrokers.py
test_publish_subscribe
44
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta import pytest from apscheduler.triggers.interval import IntervalTrigger def test_bad_end_time(timezone): start_time = datetime(2020, 5, 16, tzinfo=timezone) end_time = datetime(2020, 5, 15, tzinfo=timezone) exc
ValueError, seconds=1, start_time=start_time, end_time=end_time)
pytest.raises
complex_expr
tests/triggers/test_interval.py
test_bad_end_time
18
null
agronholm/apscheduler
from __future__ import annotations import sys from contextlib import AsyncExitStack from datetime import datetime, timezone from logging import Logger import pytest from _pytest.logging import LogCaptureFixture from anyio import CancelScope, create_memory_object_stream, fail_after from apscheduler import Event, Sche...
"schedule1"
assert
string_literal
tests/test_eventbrokers.py
test_publish_subscribe
42
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timezone from typing import NoReturn from uuid import uuid4 import pytest from apscheduler import ( DeserializationError, Event, JobAdded, JobOutcome, JobReleased, SerializationError, ) from apscheduler.abc import Serializer @...
None
assert
none_literal
tests/test_serializers.py
test_deserialization_error
74
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime from zoneinfo import ZoneInfo import pytest from apscheduler.triggers.cron import CronTrigger @pytest.mark.parametrize("expr", ["fab", "jan-fab"], ids=["start", "end"]) def test_invalid_month_name(expr): exc = pytest.raises(
ValueError, month=expr)
pytest.raises
complex_expr
tests/triggers/test_cron.py
test_invalid_month_name
28
null
agronholm/apscheduler
from __future__ import annotations import logging from collections.abc import AsyncGenerator, Generator from contextlib import AsyncExitStack from logging import Logger from pathlib import Path from typing import Any, cast from zoneinfo import ZoneInfo import pytest from _pytest.fixtures import SubRequest from pytest...
engine.pool.status()
assert
func_call
tests/conftest.py
psycopg_async_store
163
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta, timezone import pytest from apscheduler import MaxIterationsReached from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger from apscheduler.triggers.combining import AndTrigger, OrTrigger from apscheduler.triggers.cron im...
date2
assert
variable
tests/triggers/test_combining.py
test_two_datetriggers
TestOrTrigger
176
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta, timezone import pytest from apscheduler import MaxIterationsReached from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger from apscheduler.triggers.combining import AndTrigger, OrTrigger from apscheduler.triggers.cron im...
date1
assert
variable
tests/triggers/test_combining.py
test_two_datetriggers
TestOrTrigger
171
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime from apscheduler.triggers.date import DateTrigger def test_run_time(timezone, serializer): run_time = datetime(2020, 5, 14, 11, 56, 12, tzinfo=timezone) trigger = DateTrigger(run_time) if serializer: payload = serializer.serialize(t...
None
assert
none_literal
tests/triggers/test_date.py
test_run_time
16
null
agronholm/apscheduler
from __future__ import annotations import sys from datetime import timedelta from functools import partial from types import ModuleType import pytest from apscheduler import SerializationError from apscheduler._marshalling import callable_from_ref, callable_to_ref class TestCallableFromRef: def test_valid_ref(s...
RotatingFileHandler
assert
variable
tests/test_marshalling.py
test_valid_ref
TestCallableFromRef
92
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime from zoneinfo import ZoneInfo import pytest from apscheduler.triggers.cron import CronTrigger @pytest.mark.parametrize( "minute, start_time, correct_next_dates", [ ( 0, datetime(2024, 10, 27, 2, 0, 0, 0), ...
str(correct_next_date)
assert
func_call
tests/triggers/test_cron.py
test_dst_change2
446
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta, timezone import pytest from apscheduler import MaxIterationsReached from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger from apscheduler.triggers.combining import AndTrigger, OrTrigger from apscheduler.triggers.cron im...
"AndTrigger([IntervalTrigger(seconds=4, " "start_time='2020-05-16 14:17:30.254212+02:00'), IntervalTrigger(" "seconds=4, start_time='2020-05-16 14:17:32.254212+02:00')], " "threshold=1.0, max_iterations=10000)"
assert
string_literal
tests/triggers/test_combining.py
test_repr
TestAndTrigger
60
null
agronholm/apscheduler
from __future__ import annotations import platform from collections.abc import AsyncGenerator from contextlib import AsyncExitStack, asynccontextmanager from datetime import datetime, timedelta, timezone from logging import Logger from pathlib import Path from typing import TYPE_CHECKING from unittest.mock import Mock...
0
assert
numeric_literal
tests/test_datastores.py
test_acquire_jobs_max_number_exceeded
613
null
agronholm/apscheduler
from __future__ import annotations from datetime import date, datetime import pytest from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger def test_bad_interval(timezone): exc = pytest.raises(
ValueError, timezone=timezone)
pytest.raises
complex_expr
tests/triggers/test_calendarinterval.py
test_bad_interval
11
null
agronholm/apscheduler
from __future__ import annotations import sys from contextlib import AsyncExitStack from datetime import datetime, timezone from logging import Logger import pytest from _pytest.logging import LogCaptureFixture from anyio import CancelScope, create_memory_object_stream, fail_after from apscheduler import Event, Sche...
caplog.text
assert
complex_expr
tests/test_eventbrokers.py
test_publish_exception
111
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta import pytest from apscheduler.triggers.interval import IntervalTrigger def test_bad_interval(): exc = pytest.raises(
ValueError)
pytest.raises
variable
tests/triggers/test_interval.py
test_bad_interval
11
null
agronholm/apscheduler
from __future__ import annotations from datetime import date, datetime import pytest from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger def test_bad_start_end_dates(timezone): exc
ValueError, days=1, start_date=date(2016, 3, 4), end_date=date(2016, 3, 3), timezone=timezone)
pytest.raises
func_call
tests/triggers/test_calendarinterval.py
test_bad_start_end_dates
16
null
agronholm/apscheduler
from __future__ import annotations from datetime import date, datetime import pytest from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger def test_nonexistent_days(timezone, serializer): """Test that invalid dates are skipped.""" trigger = CalendarIntervalTrigger( months=1, star...
datetime(2016, 5, 31, tzinfo=timezone)
assert
func_call
tests/triggers/test_calendarinterval.py
test_nonexistent_days
80
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime from zoneinfo import ZoneInfo import pytest from apscheduler.triggers.cron import CronTrigger def test_invalid_weekday_position_name(): exc = pytest.raises(
ValueError, day="1st web")
pytest.raises
complex_expr
tests/triggers/test_cron.py
test_invalid_weekday_position_name
39
null
agronholm/apscheduler
from __future__ import annotations import sys from contextlib import AsyncExitStack from datetime import datetime, timezone from logging import Logger import pytest from _pytest.logging import LogCaptureFixture from anyio import CancelScope, create_memory_object_stream, fail_after from apscheduler import Event, Sche...
TimeoutError)
pytest.raises
variable
tests/test_eventbrokers.py
test_subscribe_one_shot
67
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta, timezone import pytest from apscheduler import MaxIterationsReached from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger from apscheduler.triggers.combining import AndTrigger, OrTrigger from apscheduler.triggers.cron im...
start_time
assert
variable
tests/triggers/test_combining.py
test_two_interval_triggers
TestOrTrigger
192
null
agronholm/apscheduler
from __future__ import annotations import platform from collections.abc import AsyncGenerator from contextlib import AsyncExitStack, asynccontextmanager from datetime import datetime, timedelta, timezone from logging import Logger from pathlib import Path from typing import TYPE_CHECKING from unittest.mock import Mock...
1
assert
numeric_literal
tests/test_datastores.py
test_acquire_release_schedules
232
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime from zoneinfo import ZoneInfo import pytest from apscheduler.triggers.cron import CronTrigger def test_invalid_step(): exc = pytest.raises(
ValueError, year="2009/0")
pytest.raises
complex_expr
tests/triggers/test_cron.py
test_invalid_step
17
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta, timezone import pytest from apscheduler import MaxIterationsReached from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger from apscheduler.triggers.combining import AndTrigger, OrTrigger from apscheduler.triggers.cron im...
expected_datetime
assert
variable
tests/triggers/test_combining.py
test_overlapping_triggers
TestAndTrigger
162
null
agronholm/apscheduler
from __future__ import annotations import platform from collections.abc import AsyncGenerator from contextlib import AsyncExitStack, asynccontextmanager from datetime import datetime, timedelta, timezone from logging import Logger from pathlib import Path from typing import TYPE_CHECKING from unittest.mock import Mock...
2
assert
numeric_literal
tests/test_datastores.py
test_add_replace_task
116
null
agronholm/apscheduler
from __future__ import annotations import os import sys import threading import time from collections import defaultdict from collections.abc import Callable from contextlib import AsyncExitStack from datetime import datetime, timedelta, timezone from functools import partial from inspect import signature from queue i...
3
assert
numeric_literal
tests/test_schedulers.py
test_properties
TestAsyncScheduler
155
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime from zoneinfo import ZoneInfo import pytest from apscheduler.triggers.cron import CronTrigger def test_weekday_range(timezone, serializer): start_time = datetime(2020, 1, 1, tzinfo=timezone) trigger = CronTrigger( year=2020, mo...
None
assert
none_literal
tests/triggers/test_cron.py
test_weekday_range
201
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime from apscheduler.triggers.date import DateTrigger def test_run_time(timezone, serializer): run_time = datetime(2020, 5, 14, 11, 56, 12, tzinfo=timezone) trigger = DateTrigger(run_time) if serializer: payload = serializer.serialize(t...
"DateTrigger('2020-05-14 11:56:12+02:00')"
assert
string_literal
tests/triggers/test_date.py
test_run_time
17
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta import pytest from apscheduler.triggers.interval import IntervalTrigger def test_end_time(timezone, serializer): start_time = datetime(2020, 5, 16, 19, 32, 44, 649521, tzinfo=timezone) end_time = datetime(2020, 5, 16, 22, 33, 1, tzi...
start_time + interval
assert
complex_expr
tests/triggers/test_interval.py
test_end_time
36
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta import pytest from apscheduler.triggers.interval import IntervalTrigger def test_repr(timezone, serializer): start_time = datetime(2020, 5, 15, 12, 55, 32, 954032, tzinfo=timezone) end_time = datetime(2020, 6, 4, 16, 18, 49, 306942,...
"IntervalTrigger(weeks=1, days=2, hours=3, minutes=4, seconds=5, " "microseconds=123525, start_time='2020-05-15 12:55:32.954032+02:00', " "end_time='2020-06-04 16:18:49.306942+02:00')"
assert
string_literal
tests/triggers/test_interval.py
test_repr
57
null
agronholm/apscheduler
from __future__ import annotations from datetime import date, datetime import pytest from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger def test_repr(timezone, serializer): trigger = CalendarIntervalTrigger( years=1, months=5, weeks=6, days=8, hour=...
"CalendarIntervalTrigger(years=1, months=5, weeks=6, days=8, " "time='03:00:08', start_date='2016-03-05', end_date='2020-12-25', " "timezone='Europe/Berlin')"
assert
string_literal
tests/triggers/test_calendarinterval.py
test_repr
98
null
agronholm/apscheduler
from __future__ import annotations import os import sys import threading import time from collections import defaultdict from collections.abc import Callable from contextlib import AsyncExitStack from datetime import datetime, timedelta, timezone from functools import partial from inspect import signature from queue i...
1
assert
numeric_literal
tests/test_schedulers.py
test_scheduler_crash_restart_schedule_immediately
TestAsyncScheduler
1,096
null
agronholm/apscheduler
from __future__ import annotations import sys from contextlib import AsyncExitStack from datetime import datetime, timezone from logging import Logger import pytest from _pytest.logging import LogCaptureFixture from anyio import CancelScope, create_memory_object_stream, fail_after from apscheduler import Event, Sche...
"postgresql://myuser:c %2F%25%40@localhost:7654/dbname?opt1=foo&opt2=bar"
assert
string_literal
tests/test_eventbrokers.py
test_asyncpg_broker_from_async_engine
147
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta import pytest from apscheduler.triggers.interval import IntervalTrigger def test_end_time(timezone, serializer): start_time = datetime(2020, 5, 16, 19, 32, 44, 649521, tzinfo=timezone) end_time = datetime(2020, 5, 16, 22, 33, 1, tzi...
None
assert
none_literal
tests/triggers/test_interval.py
test_end_time
38
null
agronholm/apscheduler
from __future__ import annotations import sys from contextlib import AsyncExitStack from datetime import datetime, timezone from logging import Logger import pytest from _pytest.logging import LogCaptureFixture from anyio import CancelScope, create_memory_object_stream, fail_after from apscheduler import Event, Sche...
"task1"
assert
string_literal
tests/test_eventbrokers.py
test_publish_subscribe
43
null
agronholm/apscheduler
from __future__ import annotations import sys from datetime import timedelta from functools import partial from types import ModuleType import pytest from apscheduler import SerializationError from apscheduler._marshalling import callable_from_ref, callable_to_ref class TestCallableFromRef: @pytest.mark.parame...
error)
pytest.raises
variable
tests/test_marshalling.py
test_lookup_error
TestCallableFromRef
112
null
agronholm/apscheduler
from __future__ import annotations import sys from datetime import timedelta from functools import partial from types import ModuleType import pytest from apscheduler import SerializationError from apscheduler._marshalling import callable_from_ref, callable_to_ref class TestCallableToRef: @pytest.mark.parametri...
SerializationError)
pytest.raises
variable
tests/test_marshalling.py
test_errors
TestCallableToRef
49
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta import pytest from apscheduler.triggers.interval import IntervalTrigger def test_end_time(timezone, serializer): start_time = datetime(2020, 5, 16, 19, 32, 44, 649521, tzinfo=timezone) end_time = datetime(2020, 5, 16, 22, 33, 1, tzi...
start_time + interval * 2
assert
complex_expr
tests/triggers/test_interval.py
test_end_time
37
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timedelta, timezone import pytest from apscheduler import MaxIterationsReached from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger from apscheduler.triggers.combining import AndTrigger, OrTrigger from apscheduler.triggers.cron im...
start_time + timedelta(seconds=4)
assert
func_call
tests/triggers/test_combining.py
test_two_interval_triggers
TestOrTrigger
193
null
agronholm/apscheduler
from __future__ import annotations from datetime import datetime, timezone from typing import NoReturn from uuid import uuid4 import pytest from apscheduler import ( DeserializationError, Event, JobAdded, JobOutcome, JobReleased, SerializationError, ) from apscheduler.abc import Serializer @...
DeserializationError)
pytest.raises
variable
tests/test_serializers.py
test_deserialization_error
71
null
agronholm/apscheduler
from __future__ import annotations from datetime import date, datetime import pytest from apscheduler.triggers.calendarinterval import CalendarIntervalTrigger def test_missing_time(timezone, serializer): """ Test that if the designated time does not exist on a day due to a forward DST shift, the day is ...
datetime(2016, 3, 28, 2, 30, tzinfo=timezone)
assert
func_call
tests/triggers/test_calendarinterval.py
test_missing_time
52
null