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
MongoEngine/mongoengine
import logging import random import time import unittest from threading import Thread import pymongo import pytest from bson import DBRef from mongoengine import * from mongoengine.connection import _get_session, get_db from mongoengine.context_managers import ( no_dereference, no_sub_classes, query_count...
1
assert
numeric_literal
tests/test_context_managers.py
test_no_sub_classes
TestContextManagers
315
null
MongoEngine/mongoengine
import unittest from mongoengine import * from tests.utils import MongoDBTestCase class TestGeoField(MongoDBTestCase): def _test_for_expected_error(self, Cls, loc, expected): try: Cls(loc=loc).validate() self.fail(f"Should not validate the location {loc}") except Validation...
info
assert
variable
tests/fields/test_geo_fields.py
test_geo_indexes_recursion
TestGeoField
364
null
MongoEngine/mongoengine
from enum import Enum import pytest from bson import InvalidDocument from mongoengine import ( DictField, Document, EnumField, ListField, ValidationError, ) from tests.utils import MongoDBTestCase, get_as_pymongo class TestStringEnumField(MongoDBTestCase): def test_change_value(self): ...
Status.DONE
assert
complex_expr
tests/fields/test_enum_field.py
test_change_value
TestStringEnumField
63
null
MongoEngine/mongoengine
import unittest from datetime import datetime import pytest from pymongo.collation import Collation from pymongo.errors import OperationFailure from mongoengine import * from mongoengine.connection import get_db from mongoengine.mongodb_support import ( MONGODB_42, MONGODB_80, get_mongodb_version, ) from ...
1
assert
numeric_literal
tests/document/test_indexes.py
test_primary_save_duplicate_update_existing_object
TestIndexes
895
null
datmo/datmo
import os import shutil import tempfile import platform from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.file.file_collection import \ FileCollectionController from datmo.core.util.exceptions import EntityNotFound, UnstagedCh...
current_hash
assert
variable
datmo/core/controller/file/tests/test_file_collection.py
test_checkout
TestFileCollectionController
275
null
datmo/datmo
import os import tempfile import platform import timeout_decorator from datmo.config import Config from datmo import __version__ from datmo.cli.driver.helper import Helper from datmo.cli.command.project import ProjectCommand from datmo.cli.command.snapshot import SnapshotCommand from datmo.core.entity.snapshot import ...
updated_name
assert
variable
datmo/cli/command/tests/test_project.py
test_init_update_success
TestProjectCommand
188
null
datmo/datmo
import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, CodeNotInitialized, UnstagedChanges, CommitDoesNotExist class TestFileCodeDriver(): def s...
commit_hash
assert
variable
datmo/core/controller/code/driver/tests/test_file.py
test_current_ref
TestFileCodeDriver
197
null
datmo/datmo
import os import uuid import tempfile import platform from io import open, TextIOWrapper from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import EnvironmentController from datmo.core.controller.task import TaskController from...
None
assert
none_literal
datmo/core/controller/tests/test_task.py
test_parse_logs_for_results
TestTaskController
190
null
datmo/datmo
import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.git import (GitCodeDriver, GitHostDriver) from datmo.core.util.exceptions import (CommitFailed, CommitDoesNotExist, ...
None
assert
none_literal
datmo/core/controller/code/driver/tests/test_git.py
test_instantiation
TestGitCodeDriver
53
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.environment import Environment from datmo.core.util.except...
1
assert
numeric_literal
datmo/core/storage/local/tests/test_dal_environment.py
test_query_environments_basic
TestLocalDAL
145
null
datmo/datmo
import os import tempfile import platform from datmo.logger import Logger class TestLoggerModule(): def setup_method(self): # provide mountable tmp directory for docker tempfile.tempdir = "/tmp" if not platform.system( ) == "Windows" else None test_datmo_dir = os.environ.get('TEST_...
config
assert
variable
datmo/tests/test_logger.py
test_log_config
TestLoggerModule
31
null
datmo/datmo
from future import standard_library standard_library.install_aliases() from builtins import input import os import sys import pytest import tempfile import platform from datmo.cli.driver.helper import Helper from datmo.core.util.exceptions import ArgumentError from datmo.cli.command.project import ProjectCommand from...
test_input
assert
variable
datmo/cli/driver/tests/test_helper.py
test_prompt
TestHelper
68
null
datmo/datmo
from datmo.core.entity.task import Task class TestTask(): def setup_class(self): self.input_dict = { "model_id": "my_model", "command": "python test.py", "data_file_path_map": [("/absolute/path/to/data_file", ...
task_entity_2
assert
variable
datmo/core/entity/tests/test_task.py
test_eq
TestTask
73
null
datmo/datmo
import os import tempfile import platform from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.snapshot import Snapshot from datmo.core.util.exceptions import EntityNotFound, InvalidA...
updated_snapshot.updated_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_snapshot.py
test_update_snapshot
TestLocalDAL
114
null
datmo/datmo
from datmo.core.entity.code import Code class TestCode(): def setup_class(self): self.input_dict = { "model_id": "my_model", "driver_type": "git", "commit_id": "mycommit" } def test_eq(self): code_entity_1 = Code(self.input_dict) code_entity_...
code_entity_2
assert
variable
datmo/core/entity/tests/test_code.py
test_eq
TestCode
34
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.user import User from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType class T...
user_1.created_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_user.py
test_query_users_multiple
TestLocalDAL
122
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.code import Code from datmo.core.util.exceptions import En...
updated_code.updated_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_code.py
test_update_code
TestLocalDAL
98
null
datmo/datmo
from datmo.core.entity.code import Code class TestCode(): def setup_class(self): self.input_dict = { "model_id": "my_model", "driver_type": "git", "commit_id": "mycommit" } def test_init_no_id(self): code_entity = Code(self.input_dict) for k...
v
assert
variable
datmo/core/entity/tests/test_code.py
test_init_no_id
TestCode
18
null
datmo/datmo
import os import uuid import threading import tempfile import platform import timeout_decorator from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import \ EnvironmentController from datmo.core.entity.en...
current_hash
assert
variable
datmo/core/controller/environment/tests/test_environment.py
test_checkout
TestEnvironmentController
1,127
null
datmo/datmo
import os import tempfile import platform import timeout_decorator from datmo.config import Config from datmo import __version__ from datmo.cli.driver.helper import Helper from datmo.cli.command.project import ProjectCommand from datmo.cli.command.snapshot import SnapshotCommand from datmo.core.entity.snapshot import ...
None
assert
none_literal
datmo/cli/command/tests/test_project.py
test_init_create_success_default_name_no_description_no_environment
TestProjectCommand
70
null
datmo/datmo
import os import time import tempfile import platform import datetime from pytz import timezone from io import open from datmo.core.util.misc_functions import ( bytes2human, create_unique_hash, mutually_exclusive, is_project_dir, find_project_dir, grep, prettify_datetime, format_table, parse_cli_key_value,...
"new"
assert
string_literal
datmo/core/util/tests/test_misc_functions.py
test_parse_path
TestMiscFunctions
217
null
datmo/datmo
import tempfile import platform import os from io import open from datmo.core.util.json_store import JSONStore from datmo.core.util.exceptions import FileIOError class TestJSONStore(): def setup_class(self): # provide mountable tmp directory for docker tempfile.tempdir = "/tmp" if not platform.sys...
{}
assert
collection
datmo/core/util/tests/test_json_store.py
test_load_new_json_file
TestJSONStore
76
null
datmo/datmo
import os import uuid import tempfile import platform from io import open, TextIOWrapper from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import EnvironmentController from datmo.core.controller.task import TaskController from...
0
assert
numeric_literal
datmo/core/controller/tests/test_task.py
test_run_helper
TestTaskController
132
null
datmo/datmo
import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, CodeNotInitialized, UnstagedChanges, CommitDoesNotExist class TestFileCodeDriver(): def s...
None
assert
none_literal
datmo/core/controller/code/driver/tests/test_file.py
test_instantiation
TestFileCodeDriver
50
null
datmo/datmo
import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, CodeNotInitialized, UnstagedChanges, CommitDoesNotExist class TestFileCodeDriver(): def s...
[]
assert
collection
datmo/core/controller/code/driver/tests/test_file.py
test_list_refs
TestFileCodeDriver
290
null
datmo/datmo
import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, CodeNotInitialized, UnstagedChanges, CommitDoesNotExist class TestFileCodeDriver(): def s...
1
assert
numeric_literal
datmo/core/controller/code/driver/tests/test_file.py
test_create_ref
TestFileCodeDriver
180
null
datmo/datmo
import os import shutil import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.util.exceptions import EntityNotFound, InvalidArgu...
3
assert
numeric_literal
datmo/core/storage/local/tests/test_dal_model.py
test_query_models_multiple
TestLocalDAL
148
null
datmo/datmo
import os import tempfile import datetime import platform from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType, \ RequiredArgumentMissing from datmo.core.util.misc_functions import create_unique_hash class TestBlitzDBD...
2
assert
numeric_literal
datmo/core/storage/driver/tests/test_blitzdb_dal_driver.py
test_query_gte_int
TestBlitzDBDALDriver
209
null
datmo/datmo
from future import standard_library standard_library.install_aliases() from builtins import input import os import sys import pytest import tempfile import platform from datmo.cli.driver.helper import Helper from datmo.core.util.exceptions import ArgumentError from datmo.cli.command.project import ProjectCommand from...
None
assert
none_literal
datmo/cli/driver/tests/test_helper.py
test_init
TestHelper
48
null
datmo/datmo
import os import uuid import tempfile import platform from io import open, TextIOWrapper from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import EnvironmentController from datmo.core.controller.task import TaskController from...
2
assert
numeric_literal
datmo/core/controller/tests/test_task.py
test_get_files
TestTaskController
779
null
datmo/datmo
import os import shutil import tempfile import platform from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.file.file_collection import \ FileCollectionController from datmo.core.util.exceptions import EntityNotFound, UnstagedCh...
file_collection_obj.path
assert
complex_expr
datmo/core/controller/file/tests/test_file_collection.py
test_create
TestFileCollectionController
101
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.code import Code from datmo.core.util.exceptions import En...
test_code_input_dict['id']
assert
complex_expr
datmo/core/storage/local/tests/test_dal_code.py
test_create_code_by_dictionary
TestLocalDAL
62
null
datmo/datmo
import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, CodeNotInitialized, UnstagedChanges, CommitDoesNotExist class TestFileCodeDriver(): def s...
True
assert
bool_literal
datmo/core/controller/code/driver/tests/test_file.py
test_is_initalized
TestFileCodeDriver
64
null
datmo/datmo
from datmo.core.entity.snapshot import Snapshot class TestSnapshot(): def setup_class(self): self.input_dict = { "model_id": "my_model", "message": "my message", "code_id": "code_id", "environment_id": "environment_id", "file_collection_id": "file...
True
assert
bool_literal
datmo/core/entity/tests/test_snapshot.py
test_init_no_id
TestSnapshot
30
null
datmo/datmo
import os import tempfile import datetime import platform from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType, \ RequiredArgumentMissing from datmo.core.util.misc_functions import create_unique_hash class TestBlitzDBD...
1
assert
numeric_literal
datmo/core/storage/driver/tests/test_blitzdb_dal_driver.py
test_db_wildcard_query
TestBlitzDBDALDriver
140
null
datmo/datmo
from datmo.core.entity.snapshot import Snapshot class TestSnapshot(): def setup_class(self): self.input_dict = { "model_id": "my_model", "message": "my message", "code_id": "code_id", "environment_id": "environment_id", "file_collection_id": "file...
str(snapshot_entity)
assert
func_call
datmo/core/entity/tests/test_snapshot.py
test_str
TestSnapshot
56
null
datmo/datmo
import os import uuid import tempfile import platform from io import open, TextIOWrapper from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import EnvironmentController from datmo.core.controller.task import TaskController from...
file_names
assert
variable
datmo/core/controller/tests/test_task.py
test_get_files
TestTaskController
783
null
datmo/datmo
import os import shutil import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.util.exceptions import EntityNotFound, InvalidArgu...
model_2.created_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_model.py
test_query_models_multiple
TestLocalDAL
150
null
datmo/datmo
from future import standard_library standard_library.install_aliases() from builtins import input import os import sys import pytest import tempfile import platform from datmo.cli.driver.helper import Helper from datmo.core.util.exceptions import ArgumentError from datmo.cli.command.project import ProjectCommand from...
"py27"
assert
string_literal
datmo/cli/driver/tests/test_helper.py
test_prompt_available_options
TestHelper
236
null
datmo/datmo
from datmo.core.entity.file_collection import FileCollection class TestFileCollection(): def setup_class(self): self.input_dict = { "model_id": "my_model", "driver_type": "docker", "filehash": "myhash", "path": "/path/to/file", "file_path_map": [(...
None
assert
none_literal
datmo/core/entity/tests/test_file_collection.py
test_init_no_id
TestFileCollection
22
null
datmo/datmo
import os import uuid import threading import tempfile import platform import timeout_decorator from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import \ EnvironmentController from datmo.core.entity.en...
new_name
assert
variable
datmo/core/controller/environment/tests/test_environment.py
test_update
TestEnvironmentController
810
null
datmo/datmo
import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, CodeNotInitialized, UnstagedChanges, CommitDoesNotExist class TestFileCodeDriver(): def s...
commit_hash_2
assert
variable
datmo/core/controller/code/driver/tests/test_file.py
test_current_ref
TestFileCodeDriver
203
null
datmo/datmo
import os import time import tempfile import platform import datetime from pytz import timezone from io import open from datmo.core.util.misc_functions import ( bytes2human, create_unique_hash, mutually_exclusive, is_project_dir, find_project_dir, grep, prettify_datetime, format_table, parse_cli_key_value,...
"test"
assert
string_literal
datmo/core/util/tests/test_misc_functions.py
test_parse_path
TestMiscFunctions
213
null
datmo/datmo
import os import tempfile import platform from io import open, TextIOWrapper from datmo.snapshot import create, ls, update, delete from datmo.config import Config from datmo.snapshot import Snapshot from datmo.core.entity.snapshot import Snapshot as CoreSnapshot from datmo.core.controller.project import ProjectContro...
v
assert
variable
datmo/tests/test_snapshot.py
test_snapshot_entity_instantiate
TestSnapshotModule
70
null
datmo/datmo
from datmo.core.entity.code import Code class TestCode(): def setup_class(self): self.input_dict = { "model_id": "my_model", "driver_type": "git", "commit_id": "mycommit" } def test_init_no_id(self): code_entity = Code(self.input_dict) for k...
None
assert
none_literal
datmo/core/entity/tests/test_code.py
test_init_no_id
TestCode
19
null
datmo/datmo
import os import tempfile import platform from datmo.logger import Logger class TestLoggerModule(): def setup_method(self): # provide mountable tmp directory for docker tempfile.tempdir = "/tmp" if not platform.system( ) == "Windows" else None test_datmo_dir = os.environ.get('TEST_...
result
assert
variable
datmo/tests/test_logger.py
test_log_results
TestLoggerModule
40
null
datmo/datmo
import os import shutil import tempfile import platform from io import TextIOWrapper from datmo.core.util.misc_functions import get_datmo_temp_path from datmo.core.controller.file.driver.local import LocalFileDriver from datmo.core.util.exceptions import PathDoesNotExist from datmo.config import Config class TestLoca...
1
assert
numeric_literal
datmo/core/controller/file/driver/tests/test_local.py
test_get
TestLocalFileDriver
156
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.file_collection import FileCollection from datmo.core.util...
file_collection_2.created_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_file_collection.py
test_query_file_collections_multiple
TestLocalDAL
155
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.code import Code from datmo.core.util.exceptions import En...
updated_code.id
assert
complex_expr
datmo/core/storage/local/tests/test_dal_code.py
test_update_code
TestLocalDAL
97
null
datmo/datmo
import os import tempfile import platform from io import open, TextIOWrapper from datmo.snapshot import create, ls, update, delete from datmo.config import Config from datmo.snapshot import Snapshot from datmo.core.entity.snapshot import Snapshot as CoreSnapshot from datmo.core.controller.project import ProjectContro...
"r"
assert
string_literal
datmo/tests/test_snapshot.py
test_snapshot_entity_files
TestSnapshotModule
413
null
datmo/datmo
import os import tempfile import platform from datmo.config import Config class TestConfigModule(): def setup_method(self): # provide mountable tmp directory for docker tempfile.tempdir = "/tmp" if not platform.system( ) == "Windows" else None test_datmo_dir = os.environ.get('TEST_...
'foo'
assert
string_literal
datmo/tests/test_config.py
test_config_singleton
TestConfigModule
32
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.user import User from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType class T...
user.id
assert
complex_expr
datmo/core/storage/local/tests/test_dal_user.py
test_create_user_by_dictionary
TestLocalDAL
45
null
datmo/datmo
import os import tempfile import platform from io import open, TextIOWrapper from datmo.snapshot import create, ls, update, delete from datmo.config import Config from datmo.snapshot import Snapshot from datmo.core.entity.snapshot import Snapshot as CoreSnapshot from datmo.core.controller.project import ProjectContro...
[]
assert
collection
datmo/tests/test_snapshot.py
test_create
TestSnapshotModule
104
null
datmo/datmo
import os import glob import time import tempfile import platform from argparse import ArgumentError from io import open from datmo.config import Config from datmo.cli.driver.helper import Helper from datmo.cli.command.project import ProjectCommand from datmo.cli.command.run import RunCommand from datmo.core.entity.r...
True
assert
bool_literal
datmo/cli/command/tests/test_run.py
test_run_stop_success
TestRunCommand
508
null
datmo/datmo
import tempfile import platform import os from io import open from datmo.core.util.json_store import JSONStore from datmo.core.util.exceptions import FileIOError class TestJSONStore(): def setup_class(self): # provide mountable tmp directory for docker tempfile.tempdir = "/tmp" if not platform.sys...
value
assert
variable
datmo/core/util/tests/test_json_store.py
test_get_string
TestJSONStore
60
null
datmo/datmo
from datmo.core.entity.task import Task class TestTask(): def setup_class(self): self.input_dict = { "model_id": "my_model", "command": "python test.py", "data_file_path_map": [("/absolute/path/to/data_file", ...
getattr(task_entity, k)
assert
func_call
datmo/core/entity/tests/test_task.py
test_to_dictionary
TestTask
87
null
datmo/datmo
import os import tempfile import platform import timeout_decorator from datmo.config import Config from datmo import __version__ from datmo.cli.driver.helper import Helper from datmo.cli.command.project import ProjectCommand from datmo.cli.command.snapshot import SnapshotCommand from datmo.core.entity.snapshot import ...
test_name
assert
variable
datmo/cli/command/tests/test_project.py
test_init_create_success_no_environment
TestProjectCommand
106
null
datmo/datmo
import os import shutil import tempfile import platform from io import TextIOWrapper from datmo.core.util.misc_functions import get_datmo_temp_path from datmo.core.controller.file.driver.local import LocalFileDriver from datmo.core.util.exceptions import PathDoesNotExist from datmo.config import Config class TestLoca...
True
assert
bool_literal
datmo/core/controller/file/driver/tests/test_local.py
test_is_initialized
TestLocalFileDriver
110
null
datmo/datmo
from datmo.core.util.i18n import get class Testi18n(): def test_get_string(self): msg = get("info", "cli.general.str.test", "disco") assert msg ==
"disco"
assert
string_literal
datmo/core/util/tests/test_i18n.py
test_get_string
Testi18n
21
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.file_collection import FileCollection from datmo.core.util...
result.id
assert
complex_expr
datmo/core/storage/local/tests/test_dal_file_collection.py
test_get_by_id_file_collection
TestLocalDAL
77
null
datmo/datmo
import os import tempfile import platform from io import open, TextIOWrapper from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import EnvironmentController from datmo.core.controller.task import TaskController from datmo.core....
{}
assert
collection
datmo/core/controller/tests/test_snapshot.py
test_create_no_environment_detected_in_file
TestSnapshotController
161
null
datmo/datmo
import os import tempfile import platform from datmo.config import Config from datmo.core.controller.base import BaseController from datmo.core.controller.project import ProjectController from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.controller.file.driver.local import LocalFileDriv...
None
assert
none_literal
datmo/core/controller/tests/test_base.py
test_instantiation
TestBaseController
48
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.file_collection import FileCollection from datmo.core.util...
file_collection.id
assert
complex_expr
datmo/core/storage/local/tests/test_dal_file_collection.py
test_create_file_collection_by_dictionary
TestLocalDAL
62
null
datmo/datmo
import os import uuid import threading import tempfile import platform import timeout_decorator from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import \ EnvironmentController from datmo.core.entity.en...
0
assert
numeric_literal
datmo/core/controller/environment/tests/test_environment.py
test_run
TestEnvironmentController
559
null
datmo/datmo
import os import uuid import tempfile import platform from time import sleep from datmo.core.util.logger import DatmoLogger class TestLogger(): def setup_class(self): # provide mountable tmp directory for docker tempfile.tempdir = "/tmp" if not platform.system( ) == "Windows" else None ...
content
assert
variable
datmo/core/util/tests/test_logger.py
test_comprehensive_logger
TestLogger
102
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.task import Task from datmo.core.util.exceptions import En...
task.id
assert
complex_expr
datmo/core/storage/local/tests/test_dal_task.py
test_create_task_by_dictionary
TestLocalDAL
64
null
datmo/datmo
import os import uuid import threading import tempfile import platform import timeout_decorator from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import \ EnvironmentController from datmo.core.entity.en...
environment_obj_3.id
assert
complex_expr
datmo/core/controller/environment/tests/test_environment.py
test_build
TestEnvironmentController
457
null
datmo/datmo
import os import shutil import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.util.exceptions import EntityNotFound, InvalidArgu...
model_1.created_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_model.py
test_query_models_multiple
TestLocalDAL
149
null
datmo/datmo
from future import standard_library standard_library.install_aliases() from builtins import input import os import sys import pytest import tempfile import platform from datmo.cli.driver.helper import Helper from datmo.core.util.exceptions import ArgumentError from datmo.cli.command.project import ProjectCommand from...
result
assert
variable
datmo/cli/driver/tests/test_helper.py
test_input
TestHelper
58
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.user import User from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType class T...
user_2.created_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_user.py
test_query_users_multiple
TestLocalDAL
123
null
datmo/datmo
import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.exceptions import PathDoesNotExist, FileIOError, CodeNotInitialized, UnstagedChanges, CommitDoesNotExist class TestFileCodeDriver(): def s...
item
assert
variable
datmo/core/controller/code/driver/tests/test_file.py
test_tracked_files
TestFileCodeDriver
108
null
datmo/datmo
from future import standard_library standard_library.install_aliases() from builtins import input import os import sys import pytest import tempfile import platform from datmo.cli.driver.helper import Helper from datmo.core.util.exceptions import ArgumentError from datmo.cli.command.project import ProjectCommand from...
True
assert
bool_literal
datmo/cli/driver/tests/test_helper.py
test_prompt_bool
TestHelper
162
null
datmo/datmo
import os import shutil import tempfile import platform from io import TextIOWrapper from datmo.core.util.misc_functions import get_datmo_temp_path from datmo.core.controller.file.driver.local import LocalFileDriver from datmo.core.util.exceptions import PathDoesNotExist from datmo.config import Config class TestLoca...
result_2
assert
variable
datmo/core/controller/file/driver/tests/test_local.py
test_get_dirhash
TestLocalFileDriver
500
null
datmo/datmo
from datmo.core.entity.task import Task class TestTask(): def setup_class(self): self.input_dict = { "model_id": "my_model", "command": "python test.py", "data_file_path_map": [("/absolute/path/to/data_file", ...
v
assert
variable
datmo/core/entity/tests/test_task.py
test_init_no_id
TestTask
23
null
datmo/datmo
import os import tempfile import platform from io import open, TextIOWrapper from datmo.snapshot import create, ls, update, delete from datmo.config import Config from datmo.snapshot import Snapshot from datmo.core.entity.snapshot import Snapshot as CoreSnapshot from datmo.core.controller.project import ProjectContro...
{}
assert
collection
datmo/tests/test_snapshot.py
test_create
TestSnapshotModule
105
null
datmo/datmo
import os import uuid import tempfile import platform from io import open, TextIOWrapper from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import EnvironmentController from datmo.core.controller.task import TaskController from...
"a"
assert
string_literal
datmo/core/controller/tests/test_task.py
test_get_files
TestTaskController
796
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.user import User from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType class T...
updated_user.updated_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_user.py
test_update_user
TestLocalDAL
89
null
datmo/datmo
import os import uuid import threading import tempfile import platform import timeout_decorator from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import \ EnvironmentController from datmo.core.entity.en...
"test"
assert
string_literal
datmo/core/controller/environment/tests/test_environment.py
test_create
TestEnvironmentController
209
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.environment import Environment from datmo.core.util.except...
environment_2.created_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_environment.py
test_query_environments_multiple
TestLocalDAL
159
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.task import Task from datmo.core.util.exceptions import En...
result.end_time
assert
complex_expr
datmo/core/storage/local/tests/test_dal_task.py
test_get_by_id_task
TestLocalDAL
82
null
datmo/datmo
import os import shutil import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.util.exceptions import EntityNotFound, InvalidArgu...
updated_model.updated_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_model.py
test_update_model
TestLocalDAL
114
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.file_collection import FileCollection from datmo.core.util...
file_collection_1.created_at
assert
complex_expr
datmo/core/storage/local/tests/test_dal_file_collection.py
test_query_file_collections_multiple
TestLocalDAL
154
null
datmo/datmo
import os import tempfile import platform from datmo.config import Config class TestConfigModule(): def setup_method(self): # provide mountable tmp directory for docker tempfile.tempdir = "/tmp" if not platform.system( ) == "Windows" else None test_datmo_dir = os.environ.get('TEST_...
c2
assert
variable
datmo/tests/test_config.py
test_config_singleton
TestConfigModule
30
null
datmo/datmo
from datmo.core.entity.task import Task class TestTask(): def setup_class(self): self.input_dict = { "model_id": "my_model", "command": "python test.py", "data_file_path_map": [("/absolute/path/to/data_file", ...
str(task_entity)
assert
func_call
datmo/core/entity/tests/test_task.py
test_str
TestTask
81
null
datmo/datmo
import os import shutil import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.util.exceptions import EntityNotFound, InvalidArgu...
result.id
assert
complex_expr
datmo/core/storage/local/tests/test_dal_model.py
test_get_by_id_model
TestLocalDAL
55
null
datmo/datmo
import os import shutil import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.util.exceptions import EntityNotFound, InvalidArgu...
1
assert
numeric_literal
datmo/core/storage/local/tests/test_dal_model.py
test_query_models_basic
TestLocalDAL
133
null
datmo/datmo
import os import tempfile import platform import time import timeout_decorator from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.snapshot import SnapshotController from datmo.core.controller.environment.environment import Environm...
"else"
assert
string_literal
datmo/core/controller/tests/test_project.py
test_init_reinit_success
TestProjectController
148
null
datmo/datmo
from future import standard_library standard_library.install_aliases() from builtins import input import os import sys import pytest import tempfile import platform from datmo.cli.driver.helper import Helper from datmo.core.util.exceptions import ArgumentError from datmo.cli.command.project import ProjectCommand from...
default_input
assert
variable
datmo/cli/driver/tests/test_helper.py
test_prompt
TestHelper
79
null
datmo/datmo
import os import tempfile import platform from datmo.config import Config from datmo.core.controller.base import BaseController from datmo.core.controller.project import ProjectController from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.controller.file.driver.local import LocalFileDriv...
"local"
assert
string_literal
datmo/core/controller/tests/test_base.py
test_default_file_driver_not_initialized
TestBaseController
69
null
datmo/datmo
import tempfile import platform import os from io import open from datmo.core.util.json_store import JSONStore from datmo.core.util.exceptions import FileIOError class TestJSONStore(): def setup_class(self): # provide mountable tmp directory for docker tempfile.tempdir = "/tmp" if not platform.sys...
self.storage_file
assert
complex_expr
datmo/core/util/tests/test_json_store.py
test_init
TestJSONStore
44
null
datmo/datmo
import os import uuid import tempfile import platform import timeout_decorator from datmo.config import Config from datmo.cli.driver.helper import Helper from datmo.cli.command.environment import EnvironmentCommand from datmo.cli.command.project import ProjectCommand from datmo.cli.command.workspace import WorkspaceCo...
True
assert
bool_literal
datmo/cli/command/tests/test_workspace.py
test_notebook
TestWorkspace
88
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.code import Code from datmo.core.util.exceptions import En...
result.id
assert
complex_expr
datmo/core/storage/local/tests/test_dal_code.py
test_get_by_id_code
TestLocalDAL
67
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.file_collection import FileCollection from datmo.core.util...
3
assert
numeric_literal
datmo/core/storage/local/tests/test_dal_file_collection.py
test_query_file_collections_multiple
TestLocalDAL
153
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.user import User from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType class T...
set(ids)
assert
func_call
datmo/core/storage/local/tests/test_dal_user.py
test_query_users_multiple
TestLocalDAL
156
null
datmo/datmo
from datmo.core.entity.code import Code class TestCode(): def setup_class(self): self.input_dict = { "model_id": "my_model", "driver_type": "git", "commit_id": "mycommit" } def test_to_dictionary(self): code_entity = Code(self.input_dict) out...
getattr(code_entity, k)
assert
func_call
datmo/core/entity/tests/test_code.py
test_to_dictionary
TestCode
41
null
datmo/datmo
import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.git import (GitCodeDriver, GitHostDriver) from datmo.core.util.exceptions import (CommitFailed, CommitDoesNotExist, ...
commit_hash
assert
variable
datmo/core/controller/code/driver/tests/test_git.py
test_current_hash
TestGitCodeDriver
133
null
datmo/datmo
import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.core.entity.model import Model from datmo.core.entity.task import Task from datmo.core.util.exceptions import En...
result.id
assert
complex_expr
datmo/core/storage/local/tests/test_dal_task.py
test_get_by_id_task
TestLocalDAL
78
null
datmo/datmo
import os import tempfile import platform from io import open, TextIOWrapper from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import EnvironmentController from datmo.core.controller.task import TaskController from datmo.core....
"a"
assert
string_literal
datmo/core/controller/tests/test_snapshot.py
test_get_files
TestSnapshotController
889
null
datmo/datmo
import os import tempfile import platform import time import timeout_decorator from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.snapshot import SnapshotController from datmo.core.controller.environment.environment import Environm...
"test1"
assert
string_literal
datmo/core/controller/tests/test_project.py
test_init_success
TestProjectController
100
null
datmo/datmo
from datmo.core.entity.user import User class TestUser(): def setup_class(self): self.input_dict = {"name": "test", "email": "test@test.com"} def test_init_no_id(self): user_entity = User(self.input_dict) for k, v in self.input_dict.items(): assert getattr(user_entity, k)...
v
assert
variable
datmo/core/entity/tests/test_user.py
test_init_no_id
TestUser
14
null