repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_outputfilter.py
test_cookie
self.assertTrue
string_literal
22
import unittest import bottle from bottle import tob, touni from tools import ServerTestBase, tobs, warn class TestOutputFilter(ServerTestBase): def test_cookie(self): """ WSGI: Cookies """ @bottle.route('/cookie') def test(): bottle.response.set_cookie('b', 'b') bo...
'c=c; Path=/' in c)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
verify_installed
self.assertEqual
variable
12
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin),
otype)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
verify_installed
self.assertEqual
variable
13
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config,
config)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
verify_installed
self.assertEqual
complex_expr
14
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config, conf...
self.app)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
test_install_plugin
self.assertEqual
variable
20
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config, conf...
installed)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
test_install_non_plugin
self.assertRaises
variable
18
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config, conf...
TypeError)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
test_uninstall_all
self.assertFalse
complex_expr
21
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config, conf...
self.app.plugins)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
verify_installed
self.assertTrue
complex_expr
15
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config, conf...
plugin in self.app.plugins)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
test_uninstall_by_instance
self.assertTrue
complex_expr
22
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config, conf...
plugin2 in self.app.plugins)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
test_uninstall_by_instance
self.assertTrue
complex_expr
21
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config, conf...
plugin not in self.app.plugins)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
test_uninstall_by_type
self.assertTrue
complex_expr
22
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config, conf...
plugin2 not in self.app.plugins)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
test_install_decorator
self.assertTrue
complex_expr
20
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginManagement(tools.ServerTestBase): def verify_installed(self, plugin, otype, **config): self.assertEqual(type(plugin), otype) self.assertEqual(plugin.config, conf...
my_decorator in self.app.plugins)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
test_close
self.assertTrue
func_call
24
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginAPI(tools.ServerTestBase): def setUp(self): super(TestPluginAPI, self).setUp() @self.app.route('/', test='plugin.cfg') def test(**args): retu...
getattr(plugin, 'closed', False))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_plugins.py
test_close
self.assertTrue
func_call
26
import unittest import tools def my_decorator(func): def wrapper(*a, **ka): return list(func(*a, **ka))[-1] class TestPluginAPI(tools.ServerTestBase): def setUp(self): super(TestPluginAPI, self).setUp() @self.app.route('/', test='plugin.cfg') def test(**args): retu...
getattr(plugin2, 'closed', False))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_resources.py
test_path_create
self.assertEqual
bool_literal
16
from bottle import ResourceManager import os.path import unittest class TestResourceManager(unittest.TestCase): def test_path_create(self): import tempfile, shutil tempdir = tempfile.mkdtemp() try: rm = ResourceManager() exists = rm.add_path('./test/', base=tempdir)...
True)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_resources.py
test_path_create
self.assertEqual
bool_literal
14
from bottle import ResourceManager import os.path import unittest class TestResourceManager(unittest.TestCase): def test_path_create(self): import tempfile, shutil tempdir = tempfile.mkdtemp() try: rm = ResourceManager() exists = rm.add_path('./test/', base=tempdir)...
False)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_resources.py
test_path_absolutize
self.assertEqual
collection
14
from bottle import ResourceManager import os.path import unittest class TestResourceManager(unittest.TestCase): def test_path_absolutize(self): tests = ('./foo/bar/', './foo/bar/baz', './foo/baz/../bar/blub') abspath = os.path.abspath('./foo/bar/') + os.sep for test in tests: r...
[abspath])
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_resources.py
test_path_unique
self.assertEqual
collection
12
from bottle import ResourceManager import os.path import unittest class TestResourceManager(unittest.TestCase): def test_path_unique(self): tests = ('/foo/bar/', '/foo/bar/baz', '/foo/baz/../bar/blub') rm = ResourceManager() [rm.add_path(test) for test in tests] self.assertEqual(r...
['/foo/bar/'])
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_resources.py
test_root_path
self.assertEqual
collection
13
from bottle import ResourceManager import os.path import unittest class TestResourceManager(unittest.TestCase): def test_root_path(self): tests = ('/foo/bar/', '/foo/bar/baz', '/foo/baz/../bar/blub') for test in tests: rm = ResourceManager() rm.add_path('./baz/', test) ...
['/foo/bar/baz/'])
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_resources.py
test_open
self.assertEqual
func_call
12
from bottle import ResourceManager import os.path import unittest class TestResourceManager(unittest.TestCase): def test_open(self): rm = ResourceManager() rm.add_path(__file__) fp = rm.open(__file__) self.assertEqual(fp.read(),
open(__file__).read())
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_resources.py
test_get
self.assertEqual
func_call
13
from bottle import ResourceManager import os.path import unittest class TestResourceManager(unittest.TestCase): def test_get(self): rm = ResourceManager() rm.add_path('/first/') rm.add_path(__file__) rm.add_path('/last/') self.assertEqual(None,
rm.lookup('notexist.txt'))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_resources.py
test_path_order
self.assertEqual
collection
13
from bottle import ResourceManager import os.path import unittest class TestResourceManager(unittest.TestCase): def test_path_order(self): rm = ResourceManager() rm.add_path('/middle/') rm.add_path('/first/', index=0) rm.add_path('/last/') self.assertEqual(rm.path,
['/first/', '/middle/', '/last/'])
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_resources.py
test_get
self.assertEqual
func_call
14
from bottle import ResourceManager import os.path import unittest class TestResourceManager(unittest.TestCase): def test_get(self): rm = ResourceManager() rm.add_path('/first/') rm.add_path(__file__) rm.add_path('/last/') self.assertEqual(None, rm.lookup('notexist.txt')) ...
rm.lookup(os.path.basename(__file__)))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_route.py
test_callback_inspection
self.assertEqual
variable
17
import unittest import bottle from tools import api class TestRoute(unittest.TestCase): @api('0.12') def test_callback_inspection(self): def x(a, b): pass def d(f): def w(): return f() return w route = bottle.Route(None, None, None, d(x)...
x)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_route.py
test_callback_inspection
self.assertEqual
func_call
18
import unittest import bottle from tools import api class TestRoute(unittest.TestCase): @api('0.12') def test_callback_inspection(self): def x(a, b): pass def d(f): def w(): return f() return w route = bottle.Route(None, None, None, d(x)...
set(['a', 'b']))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_router.py
testBuild
self.assertEqual
variable
95
import unittest import bottle class TestRouter(unittest.TestCase): CGI = False def setUp(self): self.r = bottle.Router() def add(self, path, target, method='GET', **ka): self.r.add(path, method, target, **ka) def match(self, path, method='GET'): env = {'PATH_INFO': path, 'REQ...
url)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_router.py
test_dynamic_before_static_any
self.assertEqual
string_literal
129
import unittest import bottle class TestRouter(unittest.TestCase): CGI = False def setUp(self): self.r = bottle.Router() def add(self, path, target, method='GET', **ka): self.r.add(path, method, target, **ka) def match(self, path, method='GET'): env = {'PATH_INFO': path, 'REQ...
'foo')
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_router.py
test_dynamic_before_static_any
self.assertEqual
string_literal
131
import unittest import bottle class TestRouter(unittest.TestCase): CGI = False def setUp(self): self.r = bottle.Router() def add(self, path, target, method='GET', **ka): self.r.add(path, method, target, **ka) def match(self, path, method='GET'): env = {'PATH_INFO': path, 'REQ...
'bar')
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_router.py
assertMatches
self.assertEqual
variable
23
import unittest import bottle class TestRouter(unittest.TestCase): CGI = False def setUp(self): self.r = bottle.Router() def add(self, path, target, method='GET', **ka): self.r.add(path, method, target, **ka) def match(self, path, method='GET'): env = {'PATH_INFO': path, 'REQ...
target)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_router.py
assertMatches
self.assertEqual
variable
24
import unittest import bottle class TestRouter(unittest.TestCase): CGI = False def setUp(self): self.r = bottle.Router() def add(self, path, target, method='GET', **ka): self.r.add(path, method, target, **ka) def match(self, path, method='GET'): env = {'PATH_INFO': path, 'REQ...
urlargs)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_router.py
test_lots_of_routes
self.assertEqual
func_call
130
import unittest import bottle class TestRouter(unittest.TestCase): CGI = False def setUp(self): self.r = bottle.Router() def add(self, path, target, method='GET', **ka): self.r.add(path, method, target, **ka) def match(self, path, method='GET'): env = {'PATH_INFO': path, 'REQ...
str(n-1))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_router.py
testErrorInPattern
self.assertRaises
variable
87
import unittest import bottle class TestRouter(unittest.TestCase): CGI = False def setUp(self): self.r = bottle.Router() def add(self, path, target, method='GET', **ka): self.r.add(path, method, target, **ka) def match(self, path, method='GET'): env = {'PATH_INFO': path, 'REQ...
Exception)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_router.py
testBuildFilter
self.assertRaises
variable
124
import unittest import bottle class TestRouter(unittest.TestCase): CGI = False def setUp(self): self.r = bottle.Router() def add(self, path, target, method='GET', **ka): self.r.add(path, method, target, **ka) def match(self, path, method='GET'): env = {'PATH_INFO': path, 'REQ...
ValueError)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_router.py
testBasic
self.assertRaises
complex_expr
36
import unittest import bottle class TestRouter(unittest.TestCase): CGI = False def setUp(self): self.r = bottle.Router() def add(self, path, target, method='GET', **ka): self.r.add(path, method, target, **ka) def match(self, path, method='GET'): env = {'PATH_INFO': path, 'REQ...
bottle.HTTPError)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_securecookies.py
testValid
self.assertEqual
variable
32
import unittest import bottle from bottle import tob, touni class TestSecureCookiesInBottle(unittest.TestCase): def setUp(self): self.data = dict(a=5, b=touni('υηι¢σ∂є'), c=[1,2,3,4,tob('bytestring')]) self.secret = tob('secret') bottle.app.push() bottle.response.bind() def te...
result)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_securecookies.py
testDeEncode
self.assertEqual
variable
15
import unittest import bottle from bottle import tob, touni class TestSecureCookies(unittest.TestCase): def setUp(self): self.data = dict(a=5, b=touni('υηι¢σ∂є'), c=[1,2,3,4,tob('bytestring')]) self.key = tob('secret') def testDeEncode(self): cookie = bottle.cookie_encode(self.data, s...
decoded)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_securecookies.py
testIsEncoded
self.assertTrue
func_call
21
import unittest import bottle from bottle import tob, touni class TestSecureCookies(unittest.TestCase): def setUp(self): self.data = dict(a=5, b=touni('υηι¢σ∂є'), c=[1,2,3,4,tob('bytestring')]) self.key = tob('secret') def testDeEncode(self): cookie = bottle.cookie_encode(self.data, s...
bottle.cookie_is_encoded(cookie))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_securecookies.py
testIsEncoded
self.assertFalse
func_call
22
import unittest import bottle from bottle import tob, touni class TestSecureCookies(unittest.TestCase): def setUp(self): self.data = dict(a=5, b=touni('υηι¢σ∂є'), c=[1,2,3,4,tob('bytestring')]) self.key = tob('secret') def testDeEncode(self): cookie = bottle.cookie_encode(self.data, s...
bottle.cookie_is_encoded(tob('some string')))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_invalid
self.assertEqual
complex_expr
28
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
f.status_code)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_download
self.assertEqual
func_call
34
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
f.body.read())
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_range_parser
self.assertEqual
func_call
26
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
r('bytes=-10'))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_range_parser
self.assertEqual
func_call
27
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
r('bytes=10-'))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_valid
self.assertEqual
func_call
27
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
out.body.read())
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_ims
self.assertEqual
complex_expr
28
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
res.status_code)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_range_parser
self.assertEqual
func_call
28
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
r('bytes=5-10'))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_rfc1123
self.assertEqual
func_call
21
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
int(parse_date(rs)))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_etag
self.assertEqual
complex_expr
34
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
res.headers['ETag'])
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_range
self.assertEqual
func_call
28
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
tob('').join(f.body))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_bad
self.assertEqual
func_call
20
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
parse_date('Bad 123'))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_range_parser
self.assertEqual
func_call
29
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
r('bytes=10-,-10,5-10'))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_sendfile.py
test_mime
self.assertEqual
complex_expr
29
import unittest from bottle import static_file, request, response, parse_date, parse_range_header, Bottle, tob import bottle import wsgiref.util import os import tempfile import time basename = os.path.basename(__file__) root = os.path.dirname(__file__) basename2 = os.path.basename(bottle.__file__) root2 = os.path.di...
f.headers['Content-Type'])
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_server.py
test_simple
self.assertEqual
func_call
89
import unittest import time from tools import tob import sys import os import signal import socket from subprocess import Popen, PIPE import tools from bottle import _e, server_names serverscript = os.path.join(os.path.dirname(__file__), 'servertest.py') def ping(server, port): ''' Check if a server accepts conne...
self.fetch('test'))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_template_shortcut
self.assertEqual
variable
17
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
result)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_view_decorator
self.assertEqual
func_call
19
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
test())
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_view_decorator_issue_407
self.assertEqual
func_call
24
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
test2())
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_dedentbug
self.assertRaises
variable
24
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
NameError)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_error
self.assertRaises
variable
18
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
IndexError)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_global_config
self.assertEqual
func_call
18
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
t.render())
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_error
self.assertRaises
variable
17
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
SyntaxError)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_notfound
self.assertRaises
variable
17
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
TemplateError)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_commentonly
self.assertNotEqual
func_call
18
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
t.code.splitlines()[0])
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
assertRenders
self.assertEqual
func_call
13
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
tpl.render(*args, **vars))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_stpl.py
test_htmlutils_quote
self.assertEqual
func_call
16
from __future__ import with_statement import unittest from bottle import SimpleTemplate, TemplateError, view, template, touni, tob, html_quote import re, os import traceback from tools import chdir class TestSimpleTemplate(unittest.TestCase): def assertRenders(self, tpl, to, *args, **vars): if isinstance(t...
html_quote('<\'\r\n\t"\\>'))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_callback
self.assertEqual
variable
14
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestRouteDecorator(ServerTestBase): def test_callback(self): def test(x=5): return str(x) rv = bottle.route(callback=test) self.assertBody('5', '/test') self.ass...
test)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test
self.assertEqual
string_literal
32
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestWsgi(ServerTestBase): def get204(self): """ 204 responses must not return some entity headers """ bad = ('content-length', 'content-type') for h in bad: ...
'öäü')
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_cookie
self.assertTrue
string_literal
41
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestWsgi(ServerTestBase): def get204(self): """ 204 responses must not return some entity headers """ bad = ('content-length', 'content-type') for h in bad: ...
'b=b' in c)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
assertWraps
self.assertEqual
complex_expr
20
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestAppShortcuts(ServerTestBase): def setUp(self): ServerTestBase.setUp(self) def testWithStatement(self): default = bottle.default_app() inner_app = bottle.Bottle()...
other.__doc__)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
get204
self.assertFalse
func_call
16
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestWsgi(ServerTestBase): def get204(self): """ 204 responses must not return some entity headers """ bad = ('content-length', 'content-type') for h in bad: ...
h.lower() in bad)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_cookie
self.assertTrue
string_literal
42
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestWsgi(ServerTestBase): def get204(self): """ 204 responses must not return some entity headers """ bad = ('content-length', 'content-type') for h in bad: ...
'c=c; Path=/' in c)
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
testWithStatement
self.assertEqual
func_call
14
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestAppShortcuts(ServerTestBase): def setUp(self): ServerTestBase.setUp(self) def testWithStatement(self): default = bottle.default_app() inner_app = bottle.Bottle()...
bottle.default_app())
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_name
self.assertEqual
func_call
12
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestRouteDecorator(ServerTestBase): def test_name(self): @bottle.route(name='foo') def test(x=5): return 'ok' self.assertEqual('/test/6',
bottle.url('foo', x=6))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_autoroute
self.assertEqual
func_call
16
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestDecorators(ServerTestBase): def test_autoroute(self): app = bottle.Bottle() def a(): pass def b(x): pass def c(x, y): pass def d(x, y=5): pass ...
list(bottle.yieldroutes(a)))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_autoroute
self.assertEqual
func_call
17
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestDecorators(ServerTestBase): def test_autoroute(self): app = bottle.Bottle() def a(): pass def b(x): pass def c(x, y): pass def d(x, y=5): pass ...
list(bottle.yieldroutes(b)))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_autoroute
self.assertEqual
func_call
18
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestDecorators(ServerTestBase): def test_autoroute(self): app = bottle.Bottle() def a(): pass def b(x): pass def c(x, y): pass def d(x, y=5): pass ...
list(bottle.yieldroutes(c)))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_autoroute
self.assertEqual
func_call
19
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestDecorators(ServerTestBase): def test_autoroute(self): app = bottle.Bottle() def a(): pass def b(x): pass def c(x, y): pass def d(x, y=5): pass ...
list(bottle.yieldroutes(d)))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_autoroute
self.assertEqual
func_call
20
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestDecorators(ServerTestBase): def test_autoroute(self): app = bottle.Bottle() def a(): pass def b(x): pass def c(x, y): pass def d(x, y=5): pass ...
list(bottle.yieldroutes(e)))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/test_wsgi.py
test_routebuild
self.assertEqual
func_call
14
from __future__ import with_statement import bottle from tools import ServerTestBase, chdir from bottle import tob class TestDecorators(ServerTestBase): def test_routebuild(self): """ WSGI: Test route builder """ def foo(): pass bottle.route('/a/:b/c', name='named')(foo) bottle.req...
bottle.url('named', b='xxx'))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/tools.py
depr
assert
variable
40
from __future__ import with_statement import os import bottle import sys import unittest import wsgiref import wsgiref.util import wsgiref.validate import mimetypes import uuid from bottle import tob, tonat, BytesIO, py3k, unicode def warn(msg): sys.stderr.write('WARNING: %s\n' % msg.strip()) def tobs(data): ...
msg
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/tools.py
api
assert
variable
29
from __future__ import with_statement import os import bottle import sys import unittest import wsgiref import wsgiref.util import wsgiref.validate import mimetypes import uuid from bottle import tob, tonat, BytesIO, py3k, unicode def warn(msg): sys.stderr.write('WARNING: %s\n' % msg.strip()) def tobs(data): ...
deprecated
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/tools.py
assertStatus
self.assertEqual
func_call
97
from __future__ import with_statement import os import bottle import sys import unittest import wsgiref import wsgiref.util import wsgiref.validate import mimetypes import uuid from bottle import tob, tonat, BytesIO, py3k, unicode def warn(msg): sys.stderr.write('WARNING: %s\n' % msg.strip()) def tobs(data): ...
self.urlopen(route, **kargs)['code'])
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/tools.py
assertBody
self.assertEqual
func_call
100
from __future__ import with_statement import os import bottle import sys import unittest import wsgiref import wsgiref.util import wsgiref.validate import mimetypes import uuid from bottle import tob, tonat, BytesIO, py3k, unicode def warn(msg): sys.stderr.write('WARNING: %s\n' % msg.strip()) def tobs(data): ...
self.urlopen(route, **kargs)['body'])
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/tools.py
assertHeader
self.assertEqual
func_call
108
from __future__ import with_statement import os import bottle import sys import unittest import wsgiref import wsgiref.util import wsgiref.validate import mimetypes import uuid from bottle import tob, tonat, BytesIO, py3k, unicode def warn(msg): sys.stderr.write('WARNING: %s\n' % msg.strip()) def tobs(data): ...
self.urlopen(route, **kargs)['header'].get(name))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
bottlepy/bottle
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
train
train
test/tools.py
assertHeaderAny
self.assertTrue
func_call
111
from __future__ import with_statement import os import bottle import sys import unittest import wsgiref import wsgiref.util import wsgiref.validate import mimetypes import uuid from bottle import tob, tonat, BytesIO, py3k, unicode def warn(msg): sys.stderr.write('WARNING: %s\n' % msg.strip()) def tobs(data): ...
self.urlopen(route, **kargs)['header'].get(name, None))
5c5be34d65e7d9512bf2d6f1667565a5f14d64e9
203
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_batch_notifications.py
test_batch_effect_notifications
assert
numeric_literal
29
import pytest import asyncio from reaktiv import Signal, Computed, Effect, batch @pytest.mark.asyncio async def test_batch_effect_notifications(): """Test that effects are only triggered once after a batch update completes.""" # Setup simple counter signals x = Signal(5) y = Signal(10) sum_xy = Co...
1
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_batch_notifications.py
test_batch_sync_effect_notifications
assert
collection
42
import pytest import asyncio from reaktiv import Signal, Computed, Effect, batch @pytest.mark.asyncio async def test_batch_sync_effect_notifications(): """Test that synchronous effects are only triggered once after a batch update completes.""" # Setup simple counter signals a = Signal(1) b = Signal(2) ...
(8, 2)
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_batch_notifications.py
test_batch_sync_effect_notifications
assert
collection
27
import pytest import asyncio from reaktiv import Signal, Computed, Effect, batch @pytest.mark.asyncio async def test_batch_sync_effect_notifications(): """Test that synchronous effects are only triggered once after a batch update completes.""" # Setup simple counter signals a = Signal(1) b = Signal(2) ...
(3, -1)
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_batch_notifications.py
test_batch_effect_notifications
assert
collection
30
import pytest import asyncio from reaktiv import Signal, Computed, Effect, batch @pytest.mark.asyncio async def test_batch_effect_notifications(): """Test that effects are only triggered once after a batch update completes.""" # Setup simple counter signals x = Signal(5) y = Signal(10) sum_xy = Co...
(15, 50)
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_batch_notifications.py
test_batch_effect_notifications
assert
collection
48
import pytest import asyncio from reaktiv import Signal, Computed, Effect, batch @pytest.mark.asyncio async def test_batch_effect_notifications(): """Test that effects are only triggered once after a batch update completes.""" # Setup simple counter signals x = Signal(5) y = Signal(10) sum_xy = Co...
(28, 160)
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_batch_performance.py
test_no_unnecessary_computations_in_batch
assert
numeric_literal
31
import pytest import asyncio from unittest.mock import Mock from reaktiv import Signal, ComputeSignal, Effect, batch class TestBatchPerformance: @pytest.mark.asyncio async def test_no_unnecessary_computations_in_batch(self): """Test that computed signals don't recompute unnecessarily during batch proc...
3
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_batch_performance.py
test_no_unnecessary_computations_in_batch
assert
numeric_literal
32
import pytest import asyncio from unittest.mock import Mock from reaktiv import Signal, ComputeSignal, Effect, batch class TestBatchPerformance: @pytest.mark.asyncio async def test_no_unnecessary_computations_in_batch(self): """Test that computed signals don't recompute unnecessarily during batch proc...
5
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_batch_performance.py
test_no_unnecessary_computations_in_batch
assert
numeric_literal
36
import pytest import asyncio from unittest.mock import Mock from reaktiv import Signal, ComputeSignal, Effect, batch class TestBatchPerformance: @pytest.mark.asyncio async def test_no_unnecessary_computations_in_batch(self): """Test that computed signals don't recompute unnecessarily during batch proc...
1
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_batch_performance.py
test_no_unnecessary_effect_retriggers_in_batch
assert
numeric_literal
69
import pytest import asyncio from unittest.mock import Mock from reaktiv import Signal, ComputeSignal, Effect, batch class TestBatchPerformance: @pytest.mark.asyncio async def test_no_unnecessary_effect_retriggers_in_batch(self): """Test that effects don't retrigger unnecessarily during batch processi...
0
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_circular_dependency.py
test_circular_dependency_with_effect
assert
numeric_literal
30
import pytest from reaktiv import Signal, Computed, Effect def test_circular_dependency_with_effect(): """Test that effects can depend on signals with circular dependencies without issues.""" # Create a valid signal source = Signal(5) valid_computed = Computed(lambda: source() * 2) # Create circul...
1
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_circular_dependency.py
test_circular_dependency_with_effect
assert
numeric_literal
35
import pytest from reaktiv import Signal, Computed, Effect def test_circular_dependency_with_effect(): """Test that effects can depend on signals with circular dependencies without issues.""" # Create a valid signal source = Signal(5) valid_computed = Computed(lambda: source() * 2) # Create circul...
2
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_circular_dependency.py
test_no_false_positive_cycle_detection
assert
numeric_literal
16
import pytest from reaktiv import Signal, Computed, Effect def test_no_false_positive_cycle_detection(): """Test that valid dependency chains don't trigger false positive cycle detection.""" # Create a valid chain: base -> level1 -> level2 -> level3 base = Signal(1) level1 = Computed(lambda: base() + 1...
3
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_circular_dependency.py
test_no_false_positive_cycle_detection
assert
numeric_literal
17
import pytest from reaktiv import Signal, Computed, Effect def test_no_false_positive_cycle_detection(): """Test that valid dependency chains don't trigger false positive cycle detection.""" # Create a valid chain: base -> level1 -> level2 -> level3 base = Signal(1) level1 = Computed(lambda: base() + 1...
4
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_circular_dependency.py
test_no_false_positive_cycle_detection
assert
numeric_literal
21
import pytest from reaktiv import Signal, Computed, Effect def test_no_false_positive_cycle_detection(): """Test that valid dependency chains don't trigger false positive cycle detection.""" # Create a valid chain: base -> level1 -> level2 -> level3 base = Signal(1) level1 = Computed(lambda: base() + 1...
6
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_circular_dependency.py
test_indirect_circular_dependency
assert
numeric_literal
25
import pytest from reaktiv import Signal, Computed, Effect def test_indirect_circular_dependency(): """Test detection of a more complex circular dependency with valid dependencies mixed in.""" # Create a valid base signal base = Signal(10) # Create some valid computed signals valid1 = Computed(lam...
20
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_circular_dependency.py
test_indirect_circular_dependency
assert
numeric_literal
26
import pytest from reaktiv import Signal, Computed, Effect def test_indirect_circular_dependency(): """Test detection of a more complex circular dependency with valid dependencies mixed in.""" # Create a valid base signal base = Signal(10) # Create some valid computed signals valid1 = Computed(lam...
25
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor
buiapp/reaktiv
723048fc49b608b0135717c6e75564390232889b
35
train
train
tests/test_circular_dependency.py
test_circular_dependency_with_effect
assert
numeric_literal
31
import pytest from reaktiv import Signal, Computed, Effect def test_circular_dependency_with_effect(): """Test that effects can depend on signals with circular dependencies without issues.""" # Create a valid signal source = Signal(5) valid_computed = Computed(lambda: source() * 2) # Create circul...
10
723048fc49b608b0135717c6e75564390232889b
35
v2_extractor_at_anchor