commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
2d60ef3a9ff53c1623747fd1a00df4d788dd3777
fix tobler init
pysal/model/tobler/__init__.py
pysal/model/tobler/__init__.py
from tobler import area_weighted from tobler import data from tobler import dasymetric
Python
0.000124
@@ -51,10 +51,16 @@ t da -ta +symetric %0Afro @@ -63,31 +63,26 @@ %0Afrom tobler import -dasymetric +model %0A
d1c88387a129d64488a5ca2dee56d7fac36ffbf1
Disable GCC fallback, add time logging.
clang_wrapper.py
clang_wrapper.py
#!/usr/bin/env python import optparse import os import subprocess import sys WORLD_PATH = os.path.dirname(os.path.abspath(__file__)) COMPILER_PATH = {'gcc': 'gcc', 'clang': WORLD_PATH + '/third_party/llvm-build/Release+Asserts/bin/clang' } FILTER = {'gcc': ['-Qunused-arguments', '-no-integrated-as', '-mno-global-m...
Python
0
@@ -69,16 +69,28 @@ port sys +%0Aimport time %0A%0AWORLD_ @@ -675,46 +675,133 @@ err%0A -%0Adef compiler(flags):%0A path = 'clang' +LOG_OPTIONS = %7B'time': True, 'argv': True%7D%0A%0Adef compiler(flags):%0A path = 'clang'%0A return path # no need to use GCC for now %0A i @@ -846,24 +846,25 @@ SOURCE%5D%0A ...
deebd351b09108d95b4759b179ad84b48b6c933e
Fix typo in random-seed's help
pytest_test_groups/__init__.py
pytest_test_groups/__init__.py
from random import Random import math def get_group_size(total_items, total_groups): return int(math.ceil(float(total_items) / total_groups)) def get_group(items, group_size, group_id): start = group_size * (group_id - 1) end = start + group_size if start >= len(items) or start < 0: raise V...
Python
0.002549
@@ -909,18 +909,18 @@ seed ps -u e +u do-rando
2eca98c216a590c6163c8236c392f19ddd8d85d9
update to 4.4.12
tensorgraph/__init__.py
tensorgraph/__init__.py
# import json # from os.path import dirname # # with open(dirname(__file__) + '/pkg_info.json') as fp: # _info = json.load(fp) # __version__ = _info['version'] __version__ = "4.4.10" from .stopper import EarlyStopper from .sequential import Sequential from .graph import Graph from .node import StartNode, HiddenNo...
Python
0
@@ -182,9 +182,9 @@ .4.1 -0 +2 %22%0A%0Af
c986507b9c020a2a81a290299f7ce74748641254
update linkedinviewer
linkedinviewer.py
linkedinviewer.py
from linkedin import linkedin import oauthlib class Linkedinviewer (object): def __init__ (self, cred_file): self.cred_file = cred_file self.authentication = None self.application = None def authenticate(self): # Authenticate with LinkedIn app credential cred_list = N...
Python
0
@@ -4579,8 +4579,13 @@ count=3) +%0A
4f5d81b48a5bb48771b82f30e3853472550ee65c
add demo about using file iterator
python/src/file_iter.py
python/src/file_iter.py
# Copyright (c) 2014 ASMlover. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list ofconditions and the fol...
Python
0
@@ -2101,16 +2101,110 @@ line)%0A%0A%0A +def file_iter(filename):%0A f = open(filename)%0A for line in f:%0A process(line)%0A f.close()%0A%0A %0A%0Aif __n @@ -2637,18 +2637,24 @@ -print 'error' +file_iter(filename) %0A
a0f2e921edac34b82d3773e94ba88a1a28d296a7
Fix the expected "Dot not know how to make" error message.
test/Win32/bad-drive.py
test/Win32/bad-drive.py
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
Python
0.000553
@@ -3265,32 +3265,50 @@ %25snot_mentioned' + (%25snot_mentioned) . Stop.%5Cn%22 %25 (b @@ -3298,32 +3298,43 @@ ). Stop.%5Cn%22 %25 ( +bad_drive, bad_drive),%0A
61c693005de95557172ff78c85de2d5dc4be66f1
use N for missing nucleotides
vcfkit/phylo.py
vcfkit/phylo.py
#! /usr/bin/env python """ usage: vk phylo fasta <vcf> [<region>] vk phylo tree (nj|upgma) [--plot] <vcf> [<region>] options: -h --help Show this screen. --version Show version. """ from docopt import docopt from vcfkit import __version__ from utils.vcf import * from subpro...
Python
0.004823
@@ -708,17 +708,17 @@ e(%22.%22, %22 -- +N %22)%0A%0A @@ -1292,16 +1292,88 @@ bases))%0A + if len(gt_set) == 0:%0A exit(puts_err(%22No genotypes%22))%0A
6aead3bfc4ef7a0140238855e118e4017af1ab73
Change order of tests
pywikibot/comms/http.py
pywikibot/comms/http.py
# -*- coding: utf-8 -*- """ Basic HTTP access interface. This module handles communication between the bot and the HTTP threads. This module is responsible for - Setting up a connection pool - Providing a (blocking) interface for HTTP requests - Translate site objects with query strings into urls - U...
Python
0.000008
@@ -2618,16 +2618,111 @@ g stuff%0A + #if all else fails%0A if isinstance(request.data, Exception):%0A raise request.data%0A%0A if r @@ -2826,103 +2826,8 @@ ))%0A%0A - #if all else fails%0A if isinstance(request.data, Exception):%0A raise request.data%0A%0A
68e58114919208b69a01880f52e8b8e2918a4edb
make failing ogr/shape comparison a todo
tests/python_tests/ogr_and_shape_geometries_test.py
tests/python_tests/ogr_and_shape_geometries_test.py
#!/usr/bin/env python from nose.tools import * from utilities import execution_path import os, sys, glob, mapnik def setup(): # All of the paths used are relative, if we run the tests # from another directory we need to chdir() os.chdir(execution_path('.')) # TODO - fix truncation in shapefile... polys...
Python
0.000004
@@ -78,16 +78,22 @@ ion_path +, Todo %0A%0Aimport @@ -1058,32 +1058,132 @@ s2.featureset()%0A + raise Todo(%22output will differ between ogr and shape, may not matter, needs a closer look%22)%0A count =
8e57bac9ca41bfcccfabc8524ddc2a8730ac4609
Update quality_score_filter.py
python/quality_score_filter.py
python/quality_score_filter.py
from Bio import SeqIO import math from Tkinter import Tk import sys name = sys.argv[1] qs = float(sys.argv[3]) output = sys.argv[2] count = 0 for rec in SeqIO.parse(name, "fastq"): count += 1 print("%i reads in fastq file" % count) qual_sequences = [] # Setup an empty list cnt = 0 for rec in SeqIO.parse(name, "...
Python
0.000002
@@ -195,90 +195,28 @@ = 1%0A -print(%22%25i reads in fastq file%22 %25 count)%0A%0Aqual_sequences = %5B%5D # Setup an empty list +%0Aqual_sequences = %5B%5D %0A%0Acn @@ -722,41 +722,8 @@ c)%0A%0A -print cnt,'Quality reads saved'%0A%0A outp
9307163aa70b18af32af0b0e7b17245b33569756
Stop changed
homework.py
homework.py
from allgo_utils import PCA9685,ultrasonic,ir_sens import wiringpi as wp import time DIR_DISTANCE_ALERT = 20 preMillis = 0 ULTRASONIC_TRIG = 3 # TRIG port is to use as output signal ULTRASONIC_ECHO = 23 # ECHO port is to use as input signal OUT = {'front_left_led':5, 'front_right_led':0, 'rear_right_le...
Python
0.000005
@@ -4706,24 +4706,80 @@ ime.time()%0A%0A + for i in range(10):%0A print ultra.distance()%0A%0A print 's
fa2c69bf4399f3a96505fe33050433f275ff6e0b
Bump version to 0.0.3
streamer/__init__.py
streamer/__init__.py
__version__ = "0.0.2"
Python
0.000001
@@ -16,8 +16,8 @@ 0.0. -2 +3 %22%0A%0A
71f991d88fc115d53fd156f3788525e35fcf405e
Remove dispatch_meta from Payload signature
stoq/data_classes.py
stoq/data_classes.py
#!/usr/bin/env python3 import uuid from typing import Dict, List, Optional, Union import stoq.helpers as helpers class PayloadMeta(): def __init__(self, should_archive: bool = True, extra_data: Optional[Dict] = None, dispatch_to: List[str] = None) -> None: ...
Python
0
@@ -709,74 +709,8 @@ ne,%0A - dispatch_meta: Optional%5BDict%5Bstr, Dict%5D%5D = None,%0A
bbb911c8d4f512c598451dd8361ac3f64ac9d79b
Add the diagnosis date.
qirest_client/model/subject.py
qirest_client/model/subject.py
""" The qiprofile subject Mongodb data model. """ import re import mongoengine from mongoengine import (fields, signals) from .. import choices from .common import Encounter from .imaging import (Scan, Session) from .clinical import Treatment class Project(mongoengine.Document): """The imaging project.""" m...
Python
0.000221
@@ -2104,24 +2104,128 @@ d data.%22%22%22%0A%0A + diagnosis_date = fields.DateTimeField()%0A %22%22%22The date of the first recorded lesion diagnosis.%22%22%22%0A%0A races =
be1c89f107bb569fce9372c2bc051da84e875192
Update exception log message
volt/logging.py
volt/logging.py
"""Logging-related functionalities.""" # (c) 2012-2022 Wibowo Arindrarto <contact@arindrarto.dev> import os import sys from dataclasses import dataclass from logging.config import dictConfig from pathlib import Path from typing import Optional import better_exceptions import structlog from click import style from str...
Python
0.000002
@@ -1690,16 +1690,25 @@ f%22%7Bevent +%7D (%7Bevent .__class @@ -1723,17 +1723,9 @@ e__%7D -: %7Bevent%7D +) %22%0A
2304dcf3ebf189d7c3b1a00211a288e359c4cbb5
Rename signals for consistency
volt/signals.py
volt/signals.py
"""Signals for hooks.""" # Copyright (c) 2012-2022 Wibowo Arindrarto <contact@arindrarto.dev> # SPDX-License-Identifier: BSD-3-Clause from typing import Any import structlog from blinker import signal, NamedSignal from structlog.contextvars import bound_contextvars log = structlog.get_logger(__name__) post_site_l...
Python
0.000011
@@ -343,19 +343,19 @@ post -- +_ site -- +_ load -- +_ engi @@ -404,22 +404,22 @@ post -- +_ site -- +_ collect -- +_ targ @@ -456,14 +456,14 @@ %22pre -- +_ site -- +_ writ
b58dcf4ce81b234de6701468296f4185ed63a8e2
Add filters to the admin interface
voting/admin.py
voting/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from voting.models import Position, SACYear, Nomination def make_rejected(ModelAdmin, request, queryset): queryset.update(is_rejected=True) make_rejected.short_description = "رفض المرشحـ/ين المختار/ين" class Nominat...
Python
0
@@ -977,16 +977,93 @@ ected%5D%0A%0A +class PositionAdmin(admin.ModelAdmin):%0A list_filter = %5B'entity', 'year'%5D%0A%0A admin.si @@ -1123,23 +1123,39 @@ egister( -SACYear +Position, PositionAdmin )%0Aadmin. @@ -1168,18 +1168,17 @@ egister( -Position +SACYear )%0A
cba218d658d3feb5b0953edd44db7f88bd728077
Add is_default and user current bar id
mixmind/models.py
mixmind/models.py
# -*- coding: utf-8 -*- from sqlalchemy.orm import relationship, backref from sqlalchemy import Boolean, DateTime, Column, Integer, String, ForeignKey, Enum, Float, Text, Unicode import pendulum from flask_security import UserMixin, RoleMixin from . import db from .util import VALID_UNITS class RolesUsers(db.Model)...
Python
0.000001
@@ -725,24 +725,56 @@ y_key=True)%0A + # flask-security attributes%0A email = @@ -993,32 +993,8 @@ 7))%0A - # TODO timezone rip%0A @@ -1183,16 +1183,18 @@ (Integer +() )%0A ac @@ -1252,24 +1252,86 @@ DateTime())%0A + # other attributes%0A current_bar_id = Column(Integer())%0A roles ...
a6d037609d659a237783a3504e7090066a02fa76
make metaval have more elasticity
clime/command.py
clime/command.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from re import compile from inspect import getdoc, isbuiltin from .helpers import getargspec, getoptmetas, autotype, smartlyadd class ScanError(Exception): pass class Command(object): '''Make a function, a built-in function or a bound method accept arguments fro...
Python
0.000001
@@ -529,115 +529,21 @@ ' -N': int, 'NUM': int, 'NUMBER': int,%0A 'S': str, 'STR': str, 'STRING': str,%0A '%3Cn%3E': int, '%3C +n': int, ' num -%3E ': i @@ -551,16 +551,14 @@ t, ' -%3C number -%3E ': i @@ -574,11 +574,9 @@ ' -%3Cs%3E +s ': s @@ -580,21 +580,19 @@ : str, ' -%3C str -%3E ': ...
4ea4f12fe589d44b2f27f6e8a645f463b15d146a
Use raw_id_fields for TeamMembership inline to avoid select field with *all* users.
studygroups/admin.py
studygroups/admin.py
from django.contrib import admin # Register your models here. from studygroups.models import Course from studygroups.models import StudyGroup from studygroups.models import Meeting from studygroups.models import Application from studygroups.models import Reminder from studygroups.models import Profile from studygr...
Python
0
@@ -744,16 +744,46 @@ mbership +%0A raw_id_fields = (%22user%22,) %0A%0Aclass
847fc43b572384f8afcd395ada275b053e24a193
Fix aiohttp test
tests/test_aiohttp.py
tests/test_aiohttp.py
try: import aiohttp import aiohttp.server except ImportError: skip_tests = True else: skip_tests = False import asyncio import unittest from uvloop import _testbase as tb class _TestAioHTTP: def test_aiohttp_basic_1(self): PAYLOAD = b'<h1>It Works!</h1>' * 10000 class HttpRequ...
Python
0.000009
@@ -36,22 +36,19 @@ aiohttp. -server +web %0Aexcept @@ -257,17 +257,16 @@ YLOAD = -b '%3Ch1%3EIt @@ -291,82 +291,8 @@ 00%0A%0A - class HttpRequestHandler(aiohttp.server.ServerHttpProtocol):%0A%0A @@ -309,14 +309,10 @@ def -handle +on _req @@ -320,298 +320,71 @@ est( -self, message, payload)...
61969ac21d7eda1162cdedd3f066aa8e396fb5ba
Fix test output
raven/scripts/runner.py
raven/scripts/runner.py
""" raven.scripts.runner ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from __future__ import print_function import logging import os import sys import time from optparse import Opti...
Python
0.988755
@@ -1006,15 +1006,16 @@ n (' -servers +base_url ', ' @@ -1114,16 +1114,23 @@ r(client +.remote , k)))%0A
44ce9fbb63a2b764e759c63b3bd6f20d2e506a5c
Use from-import for ykman.descriptor
test/on_yubikey/util.py
test/on_yubikey/util.py
from __future__ import print_function import click import functools import os import sys import test.util import unittest import ykman.descriptor from ykman.util import TRANSPORT _skip = True _test_serials = os.environ.get('DESTRUCTIVE_TEST_YUBIKEY_SERIALS') _no_prompt = os.environ.get('DESTRUCTIVE_TEST_DO_NOT_PROM...
Python
0
@@ -115,22 +115,21 @@ nittest%0A -import +%0Afrom ykman.d @@ -137,17 +137,49 @@ scriptor -%0A + import list_devices, open_device %0Afrom yk @@ -516,33 +516,16 @@ dev in -ykman.descriptor. list_dev @@ -1887,33 +1887,16 @@ -ykman.descriptor. open_dev @@ -3871,58 +3871,20 @@ ith -ykman.descriptor.ope...
8b6cbdbae4dedfbbf025a7ecb20c7d7b3959ed11
support to overwrite position in border
rbgomoku/core/player.py
rbgomoku/core/player.py
from core.board import Piece class AIPlayer: """ Abstract AI players. To construct an AI player: Construct an instance (of its subclass) with the game Board """ def __init__(self, board, piece): self._board = board self.my_piece = piece self.opponent = Piece.WHITE if...
Python
0
@@ -1,8 +1,52 @@ +from core import OverwritePositionException%0A from cor @@ -401,79 +401,8 @@ CK%0A%0A - # Abstract method to get next move. Return int%5B2%5D of %7Brow, col%7D */%0A @@ -542,32 +542,44 @@ lf, board, piece +, first=True ):%0A super @@ -620,16 +620,47 @@ , piece) +%0A self.fi...
f0b7eea8a603e331be6db71beb2766d022dacb23
Refactor the method who check for changes in user agent
tests/test_browser.py
tests/test_browser.py
# -*- coding: utf-8 -*- from __future__ import with_statement import __builtin__ try: import unittest2 as unittest except ImportError: import unittest import warnings from splinter.exceptions import DriverNotFoundError from splinter.utils import deprecate_driver_class from fake_webapp import EXAMPLE_APP ...
Python
0.00001
@@ -769,24 +769,343 @@ ad(module)%0A%0A + def browser_can_receive_user_agent(self, webdriver):%0A from splinter.browser import Browser%0A browser = Browser(driver_name=webdriver, user_agent=%22iphone%22)%0A browser.visit(EXAMPLE_APP + %22useragent%22)%0A result = browser.is_text_present(...
2b7d52369206f6a6b9f0ceb4afe28e73e652e806
Fix typo s/router/route
loafer/consumer.py
loafer/consumer.py
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 import asyncio import json from functools import partial import logging import boto3 import botocore.exceptions from .conf import settings from .exceptions import ConsumerError logger = logging.getLogger(__name__) class SQSConsumer(object): def __init__(self...
Python
0.999975
@@ -1875,17 +1875,16 @@ or route -r in rout @@ -1950,17 +1950,16 @@ it route -r .fetch_m @@ -2248,17 +2248,16 @@ ge(route -r , messag
cc78aef74876049a4548398133bad64e405351de
Remove redundant parameters from wagtailuserbar tag; trigger a DeprecationWarning if people are still passing a css path
wagtail/wagtailadmin/templatetags/wagtailuserbar.py
wagtail/wagtailadmin/templatetags/wagtailuserbar.py
from django import template from wagtail.wagtailadmin.views import userbar from wagtail.wagtailcore.models import Page register = template.Library() @register.simple_tag(takes_context=True) def wagtailuserbar(context, current_page=None, items=None): # Find request object request = context['request'] ...
Python
0
@@ -1,12 +1,29 @@ +import warnings%0A%0A from django @@ -38,16 +38,17 @@ emplate%0A +%0A from wag @@ -236,38 +236,231 @@ t, c -urrent_page=None, items=None): +ss_path=None):%0A if css_path is not None:%0A warnings.warn(%0A %22Passing a CSS path to the wagtailuserbar tag is no longer required; ...
42162048981e26aecb942ca936de86dc1dd82041
Fix #23 actors.Worker identity sent on polling for activity task
swf/actors/worker.py
swf/actors/worker.py
#! -*- coding:utf-8 -*- from swf.actors import Actor from swf.models import ActivityTask from swf.exceptions import PollTimeout class ActivityWorker(Actor): """Activity task worker actor implementation Once started, will start polling for activity task, to process, and emitting heartbeat until it's stop...
Python
0
@@ -563,63 +563,341 @@ am -last_token: last seen task token%0A :type last_token +identity: Identity of the worker making the request,%0A which is recorded in the ActivityTaskStarted%0A event in the workflow history. This enables%0A diagnostic tracin...
153f7b28e5b4763dd41f95b4840dcf56d9895393
Update bot.py
code/bot1/bot.py
code/bot1/bot.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys # pip install tweepy import sys sys.path.append("..") from course_config import * argfile = str(sys.argv[1]) # need CONSUMER_KEY, CONSUMER_SECRET, ACCESS_KEY, ACCESS_SECRET auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) au...
Python
0.000001
@@ -182,16 +182,78 @@ %5B1%5D)%0A%0A%0A# + go to https://dev.twitter.com/ and register application%0A# you need CO @@ -311,16 +311,17 @@ RET %0A +%0A %0Aauth
0bc98e3cbab019af6f0543c6618387511e354f5f
Add unittests for WhisperFinder
tests/test_finders.py
tests/test_finders.py
import random import time from . import TestCase from graphite_api.intervals import Interval, IntervalSet from graphite_api.node import LeafNode, BranchNode from graphite_api.storage import Store class FinderTest(TestCase): def test_custom_finder(self): store = Store([DummyFinder()]) nodes = lis...
Python
0
@@ -1,12 +1,22 @@ +import os%0A import rando @@ -52,17 +52,63 @@ TestCase -%0A +, WHISPER_DIR%0A%0Afrom graphite_api.app import app %0Afrom gr @@ -247,16 +247,57 @@ t Store%0A +from graphite_api._vendor import whisper%0A %0A%0Aclass @@ -2082,8 +2082,1479 @@ (path))%0A +%0A%0Aclass WhisperFinderTest(TestCase):%0A...
c7f284e710b06af04c0c7142f29a169fff680b4b
Add a slash at the end of form URL
website/urls.py
website/urls.py
## # Copyright (C) 2013 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
Python
0
@@ -2717,32 +2717,33 @@ %3E%5Ba-zA-Z0-9%5C.%5D+) +/ ', views.FormInb
50e5d5c1993b164a3e6035b1572336c7969413de
Clarify wording based on whippit feedback.
synapse/lib/queue.py
synapse/lib/queue.py
from __future__ import absolute_import, unicode_literals import threading import collections from synapse.eventbus import EventBus class QueueShutdown(Exception): pass class Queue(EventBus): ''' A simple custom queue to address python Queue() issues. ''' def __init__(self, items=()): EventBu...
Python
0
@@ -3159,16 +3159,22 @@ Return +up to 3 items @@ -3230,24 +3230,25 @@ item +s = q.slice(3
091f960c8f0415acf543b40cb468d8cf33c0539e
Add name attribute to test series
tests/test_geocode.py
tests/test_geocode.py
from __future__ import absolute_import from fiona.crs import from_epsg import pandas as pd import pandas.util.testing as tm from shapely.geometry import Point import geopandas as gpd import nose from geopandas import GeoSeries from geopandas.tools import geocode, reverse_geocode from geopandas.tools.geocoding import ...
Python
0
@@ -4867,75 +4867,17 @@ -tm.assert_series_equal(g%5B'address'%5D,%0A +address = pd. @@ -4883,16 +4883,17 @@ .Series( +%5B 'address @@ -4907,76 +4907,137 @@ (x) -%0A for x in range(len(self.points))) +for x in range(len(self.points))%5D,%0A ...
a318fed2c0bf66b607b319703d03f81a15b4bd57
fix sorting of last 20 entries for min/max calculation
weight/views.py
weight/views.py
""" Part of weight_app :copyright: (c) 2012 by Andreas Madsack. :license: BSD, see LICENSE for more details. """ from flask import Blueprint, Response, request, abort, redirect, flash, \ url_for, render_template from jinja2 import TemplateNotFound from flask.ext.login import login_required, login_user, log...
Python
0
@@ -3068,16 +3068,23 @@ ht.wdate +.desc() ).limit(
ff89630886fdb931576a4a4781340bc0066c2789
Add tests for Parameters
tests/test_grammar.py
tests/test_grammar.py
import viper.grammar as vg import viper.lexer as vl from viper.grammar.languages import ( SPPF, ParseTreeEmpty as Empty, ParseTreeChar as Char, ParseTreePair as Pair, ParseTreeRep as Repeat ) import pytest @pytest.mark.parametrize('line,sppf', [ ('foo', SPPF(Char(vl.Name('foo')))), ('42', ...
Python
0
@@ -2825,32 +2825,1069 @@ pr', lexemes)%0A%0A%0A +@pytest.mark.parametrize('line,sppf', %5B%0A ('()',%0A SPPF(Pair(SPPF(Char(vl.OPEN_PAREN)),%0A SPPF(Char(vl.CLOSE_PAREN))))),%0A ('(foo: Bar)',%0A SPPF(Pair(SPPF(Char(vl.OPEN_PAREN)),%0A SPPF(Pair(SPPF(Pair(SPPF(Char(vl.Name('f...
850b3dea5f11d20714677e621a35b5ddb227e8c1
correct TwoColumnLayout compatibility
widgy/models.py
widgy/models.py
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.template import Context from django.template.loader import render_to_string from mezzanine.pages.models import Page from treebeard.mp_tree import MP_Node class ContentP...
Python
0
@@ -3867,16 +3867,17 @@ et) and +( len(self @@ -3901,16 +3901,83 @@ n()) %3C 2 + or content.id in %5Bi.content.id for i in self.node.get_children()%5D) %0A%0A de
9e2bdfece7f5cd9e02b15e9fe11c432e10a12418
update api tests
test/test_naarad_api.py
test/test_naarad_api.py
# coding=utf-8 """ © 2013 LinkedIn Corp. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");?you may not use this file except in compliance with the License.?You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
Python
0.000001
@@ -1686,16 +1686,175 @@ g diff'%0A + if naarad_obj.diff_reports_by_location('test_api_temp/0', 'test_api_temp/1', 'test_api_temp/diff_location', None):%0A print 'Error encountered during diff'%0A print
628a1418e64ba45890daee2d85223277f3a11a54
insert asset_specific_data into deck_spawn test
test/test_peerassets.py
test/test_peerassets.py
import pytest import pypeerassets as pa @pytest.mark.parametrize("prov", [pa.Explorer, pa.Cryptoid]) def test_find_deck(prov): provider = prov(network="tppc") deck = pa.find_deck(provider, 'b6a95f94fef093ee9009b04a09ecb9cb5cba20ab6f13fe0926aeb27b8671df43', 1) assert deck.__dict__ == {'asset_specific_da...
Python
0.000001
@@ -1639,16 +1639,85 @@ ersion=1 +,%0A asset_specific_data='https://talk.peercoin.net/' )%0A%0A d
0085e36491aa14f80c8979ee25c1ad0039bc3f00
Extend the 'test_parse_to_audio_requirement_bug' test case
tests/test_parsers.py
tests/test_parsers.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- """Contains test cases for the parsers module.""" from __future__ import unicode_literals import sys import os.path import unittest PATH = os.path.realpath(os.path.abspath(__file__)) sys.path.insert(0, os.path.dirname(os.path.dirname(PATH))) try: from youtube_dl_gu...
Python
0.999918
@@ -3422,16 +3422,276 @@ _list)%0A%0A + # Setting 'to_audio' to True should return the same results%0A # since the '-x' flag is already set on audio extraction%0A options_dict%5B%22to_audio%22%5D = True%0A%0A self.assertItemsEqual(options_parser.parse(options_dict), expected_cmd_list)%0A%0A...
3c811b3f0a0fd974cdac2e53dfe0a6cb1ee44e55
update process tests, move to using example_resume.yml
tests/test_process.py
tests/test_process.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2014 Christopher C. Strelioff <chris.strelioff@gmail.com> # # Distributed under terms of the MIT license. """test_process.py Test (non-command line) methods in the process.py module. """ import unittest import os import tempfile import ...
Python
0
@@ -666,831 +666,120 @@ -self.yaml = %22%22%22contact:%0A name: Jane Doe%0A address: 555 Beverly Hills Blvd.%0A city: Beverly Hills%0A state: CA%0A zip: 90210%0A email: jane@example.com%0A phone: 555.555.5555%0A jobtitle: Astronaut%0Awebsite:%0A label: mysite%0A link: 'http://mysite.com'%0Aobjective:%0A...
39db6c67fe4fc21abe23d4f801b559a0610b07ef
fix kwarg/arg order for python 2.4
conary/verify.py
conary/verify.py
# # Copyright (c) 2004-2009 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/perma...
Python
0.004628
@@ -6559,39 +6559,23 @@ ove( -*thisTrv.getNameVersionFlavor() +pristine = True ,%0A @@ -6606,31 +6606,47 @@ -pristine = True +*thisTrv.getNameVersionFlavor() )%0A
ee1532cc226987904666eeb0bda61445455d04e3
Increase test timeout
tests/test_run_app.py
tests/test_run_app.py
import ssl from unittest import mock from aiohttp import web def test_run_app_http(loop, mocker): mocker.spy(loop, 'create_server') loop.call_later(0.02, loop.stop) app = web.Application(loop=loop) mocker.spy(app, 'startup') web.run_app(app, print=lambda *args: None) assert loop.is_closed(...
Python
0.000001
@@ -147,33 +147,33 @@ p.call_later(0.0 -2 +5 , loop.stop)%0A%0A @@ -584,33 +584,33 @@ p.call_later(0.0 -2 +5 , loop.stop)%0A%0A @@ -1178,33 +1178,33 @@ p.call_later(0.0 -2 +5 , loop.stop)%0A%0A @@ -1649,17 +1649,17 @@ ater(0.0 -2 +5 , loop.s
c4b3a09886b146c8e33fec3871b0459e838a2421
test `get_fixture` helper for doctests
testing/test_doctest.py
testing/test_doctest.py
from _pytest.doctest import DoctestModule, DoctestTextfile import py, pytest class TestDoctests: def test_collect_testtextfile(self, testdir): w = testdir.maketxtfile(whatever="") checkfile = testdir.maketxtfile(test_something=""" alskdjalsdk >>> i = 5 >>> i-1 ...
Python
0
@@ -3732,28 +3732,320 @@ DocTestFailure%22%0A %5D)%0A +%0A def test_txtfile_with_fixtures(self, testdir, tmpdir):%0A p = testdir.maketxtfile(%22%22%22%0A %3E%3E%3E dir = get_fixture('tmpdir')%0A %3E%3E%3E type(dir).__name__%0A 'LocalPath'%0A %22%22%22)%0A ...
0c231b10fcff5ea970998a9313a2ce25ecc71d7c
Add test for invalid storage string
tests/test_storage.py
tests/test_storage.py
import time import pytest from limits.storage import ( MemcachedStorage, MemoryStorage, MongoDBStorage, RedisClusterStorage, RedisSentinelStorage, RedisStorage, Storage, storage_from_string, ) from limits.strategies import MovingWindowRateLimiter class TestBaseStorage: @pytest.ma...
Python
0.00001
@@ -21,16 +21,61 @@ pytest%0A%0A +from limits.errors import ConfigurationError%0A from lim @@ -2834,24 +2834,289 @@ _instance)%0A%0A + @pytest.mark.parametrize(%0A %22uri, args%22, %5B(%22blah://%22, %7B%7D), (%22redis+sentinel://localhost:26379%22, %7B%7D)%5D%0A )%0A def test_invalid_storage_string(...
c94ee5d045179fb56c172a3f4ebc7d28dfae9585
add INSTALLED_APP
myapp/settings.py
myapp/settings.py
""" Django settings for myapp project. Generated by 'django-admin startproject' using Django 1.11.6. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os f...
Python
0.000002
@@ -1056,16 +1056,28 @@ files',%0A + %22myapp%22%0A %5D%0A%0AMIDDL @@ -3692,37 +3692,8 @@ # %5D%0A -# %E6%9C%AC%E7%95%AA%E7%92%B0%E5%A2%83%E7%94%A8%E3%80%80Linux %E7%B5%B6%E5%AF%BE%E3%83%91%E3%82%B9%E3%80%80%E3%83%AD%E3%83%BC%E3%82%AB%E3%83%AB%E3%81%A7%E3%81%AF%E3%81%84%E3%82%89%E3%81%AA%E3%81%84 %0ASTA
e5b3de7ef4b068d1ce01e8fc9aec59b9182d8662
fix error in wizard tests
tests/test_wizards.py
tests/test_wizards.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import sys from distutils.version import LooseVersion import cms from .base import BaseTest try: from unittest import skipIf except ImportError: from unittest2 import skipIf class WizardTest(BaseTest): de...
Python
0.000001
@@ -2480,36 +2480,37 @@ self.assert -True +Equal (form.cleaned_da @@ -2517,32 +2517,35 @@ ta%5B'app_config'%5D +.pk , app_config)%0A @@ -3292,28 +3292,29 @@ self.assert -True +Equal (form.cleane @@ -3333,16 +3333,19 @@ config'%5D +.pk , app_co
d8b322439a5fdaf31ec52dc7c2a2ff9e18c12316
solve import error on install magpie
magpie/__init__.py
magpie/__init__.py
# -*- coding: utf-8 -*- from magpie import constants import logging import sys LOGGER = logging.getLogger(__name__) def includeme(config): LOGGER.info("Adding MAGPIE_MODULE_DIR='{}' to path.".format(constants.MAGPIE_MODULE_DIR)) sys.path.insert(0, constants.MAGPIE_MODULE_DIR) # include magpie components ...
Python
0.000006
@@ -21,37 +21,8 @@ -*-%0A -from magpie import constants%0A impo @@ -82,16 +82,16 @@ me__)%0A%0A%0A - def incl @@ -105,16 +105,162 @@ onfig):%0A + # import needs to be here, otherwise ImportError happens during setup.py install (modules not yet installed)%0A from magpie import constants%0A LOGG
5dfcd4ea8633a6bc658cccd654fce2cc7c217269
Add helpful message to end of installer.
nbdiff/install.py
nbdiff/install.py
from . import __path__ as NBDIFF_PATH import subprocess import re import os import shutil import sys def install(): profile_name = 'nbdiff' create_cmd = ['ipython', 'profile', 'create', profile_name] message = subprocess.Popen(create_cmd, stderr=subprocess.PIPE) message_str = message.stderr.read() ...
Python
0
@@ -1,12 +1,50 @@ +from __future__ import print_function%0A from . impor @@ -654,16 +654,29 @@ r.write( +%0A %22It look @@ -776,16 +776,25 @@ d it?%5Cn%22 +%0A )%0A @@ -987,68 +987,8 @@ c')%0A - print extension_copy_from%0A print extension_copy_dest%0A @@ -1054,22 +1054,70 @@...
390fa07c191d79290b1ef83c268f38431f68093a
Fix import in test client.
tests/clients/simple.py
tests/clients/simple.py
# -*- coding: utf-8 -*- from base import jsonrpyc class MyClass(object): def one(self): return 1 def twice(self, n): return n * 2 def arglen(self, *args, **kwargs): return len(args) + len(kwargs) if __name__ == "__main__": rpc = jsonrpyc.RPC(MyClass())
Python
0
@@ -19,16 +19,111 @@ 8 -*-%0A%0A%0A +import os%0Aimport sys%0A%0Abase = os.path.dirname(os.path.abspath(__file__))%0Asys.path.append(base)%0A%0A from bas
3b706a6fb345d1b6c33c3ab8d438949fc35887d3
NotImplementedException should be called NotImplementedError
nbviewer/index.py
nbviewer/index.py
#----------------------------------------------------------------------------- # Copyright (C) 2014 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #-----------------------------------------------------...
Python
0.998718
@@ -578,16 +578,12 @@ tedE -xception +rror (%22in
7c6754a439f8fa1c7ebe5c12b9c51651c02c35c4
修改post参数,添加全局editor配置
manage/new_post.py
manage/new_post.py
import datetime import json import os.path import re import shutil from pypinyin import lazy_pinyin from common import file from manage import get_excerpt def get_name(nameinput): name_raw = re.sub("[\s+\.\!\/_,$%^*(+\"\']+|[+——!,。?、~@#¥%……&*()]+", "", nameinput) namelist = lazy_pinyin(name_raw) name = ...
Python
0
@@ -1211,11 +1211,12 @@ or=%22 -vim +None %22):%0A @@ -1675,24 +1675,235 @@ be new):%22)%0A + if editor==%22None%22:%0A system_info = json.loads(file.read_file(%22./config/system.json%22))%0A if %22Editor%22 in system_info:%0A editor=system_info%5B%22Editor%22%5D%0A else:%0A ...
7bd2bfa8deb59c97f7630ed10fe70fd7e8bd8587
Update dependency bazelbuild/bazel to latest version
third_party/bazel.bzl
third_party/bazel.bzl
# Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
Python
0.000007
@@ -655,128 +655,128 @@ = %22 -d9ebac9c2bcca821902b86cdb5f1297790bba2f9%22%0Abazel_sha256 = %22f648383e43e4172a6787dcde60365091ff4dbced0485bbf9c4b515d5f2c96139 +50ce3f973cbc96a0326560a31b736a4f0ca8dc62%22%0Abazel_sha256 = %22977e63bacdec2cc29192ed52ea251915d4eda12c0cc666b4e71aade947404442 %22%0A
73d0be7a432340b4ecd140ad1cc8792d3f049779
Use SelfAttribute instead of explicit lambda
tests/factories/user.py
tests/factories/user.py
# -*- coding: utf-8 -*- # Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. import factory from factory.faker import Faker from pycroft.model.user import User from...
Python
0
@@ -774,12 +774,12 @@ ory. -Lazy +Self Attr @@ -788,20 +788,9 @@ ute( -lambda o: o. +' room @@ -797,16 +797,17 @@ .address +' )%0A%0A%0Aclas
469d5e545e3c78aed5dad3e4957956cfe0eae991
Add a missing test for Analysis.wait_until_finished().
tests/fileinfo_tests.py
tests/fileinfo_tests.py
# # Project: retdec-python # Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors # License: MIT, see the LICENSE file for more details # """Tests for the :mod:`retdec.fileinfo` module.""" import io from unittest import mock from retdec.exceptions import AnalysisFailedError from retdec.file impo...
Python
0.000475
@@ -3256,24 +3256,436 @@ D/status')%0A%0A + def test_waits_until_analysis_finishes(self):%0A self.conn_mock.send_get_request.side_effect = %5B%0A self.status_with(%7B%0A 'finished': False,%0A 'succeeded': False%0A %7D), self.status_with(%7B%0A ...
5c1a404353a0cdcd49610a21d7d19b79898ac7e3
make mpi example a little more verbose
tests/helloworld_mpi.py
tests/helloworld_mpi.py
#!/usr/bin/env python # This is an example MPI4Py program that is used # by different examples and tests. from mpi4py import MPI import time SLEEP = 10 name = MPI.Get_processor_name() comm = MPI.COMM_WORLD print "mpi rank %d/%d/%s" % (comm.rank, comm.size, name) time.sleep(SLEEP) comm.Barrier() # wait for ...
Python
0.000069
@@ -105,46 +105,102 @@ s.%0A%0A -from mpi4py import MPI%0Aimport time%0A%0A +import sys%0Aimport time%0Aimport traceback%0Afrom mpi4py import MPI%0A%0Atry :%0A print %22start%22%0A SLEE @@ -206,16 +206,20 @@ EP = 10%0A + name = @@ -243,16 +243,20 @@ _name()%0A + comm = @@ -271,16 +271,20 @@...
3bb6017897f9b8c859c2d3879c2e9d51b899f57c
Increase number of iterations for xor neural net
neuralnets/xor.py
neuralnets/xor.py
import numpy as np from net import NeuralNet net = NeuralNet(2, 1, 3, 1, 342047) output_dot = True inputs = np.array([[1,1], [0,0], [1,0], [0,1]]) outputs = np.array([[0], [0], [1], [1]]) for i in xr...
Python
0.000002
@@ -318,17 +318,17 @@ xrange( -5 +8 0000):%0A
2c37ed091baf12e53885bfa06fdb835bb8de1218
Add Bitbucket to skipif marker reason
tests/skipif_markers.py
tests/skipif_markers.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ skipif_markers -------------- Contains pytest skipif markers to be used in the suite. """ import pytest import os try: os.environ[u'TRAVIS'] except KeyError: travis = False else: travis = True try: os.environ[u'DISABLE_NETWORK_TESTS'] except KeyErr...
Python
0
@@ -640,16 +640,22 @@ reason = + (%0A 'Fails @@ -710,15 +710,35 @@ to -GitHub' +'%0A 'GitHub/Bitbucket.'%0A) %0A%0Ask
44dac786339716ad8cc05f6790b73b5fc47be812
Remove extra comma to avoid flake8 test failure in CircleCI
config/jinja2.py
config/jinja2.py
from django.urls import reverse from django.utils import translation from django.template.backends.jinja2 import Jinja2 from jinja2 import Environment class FoodsavingJinja2(Jinja2): app_dirname = 'templates' def environment(**options): env = Environment(extensions=['jinja2.ext.i18n',], **options) env.g...
Python
0.000001
@@ -289,17 +289,16 @@ xt.i18n' -, %5D, **opt
d912db90ff6f1d5cfd4d3acf863467d6c66a79b5
fix the tests to use correct urls for v4
tests/test_api_usage.py
tests/test_api_usage.py
import logging import subprocess import sys import os from nose.tools import raises logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) from luminoso_api import LuminosoClient from luminoso_api.errors import LuminosoAPIError, LuminosoError from luminoso_api.json_stream import open_json_or_csv...
Python
0.000005
@@ -1587,38 +1587,38 @@ ENT.get( -USERNAME + '/projects' +'projects/' + USERNAME )%0A pr @@ -1854,38 +1854,38 @@ .delete( -USERNAME + '/projects' +'projects/' + USERNAME ,%0A @@ -2121,38 +2121,38 @@ NT.post( -USERNAME + '/projects' +'projects/' + USERNAME , name=P @@ -2234,32 +2234,46 @@ ENT.change_path...
cac21e16693a27a7f8c3b4de60e43e316ef8791d
Remove old, less specific character tests
tests/test_character.py
tests/test_character.py
import npc import pytest def test_append_rank(): char = npc.Character() char.append_rank("Knights of the Round Table", "Dancer") assert char["rank"]["Knights of the Round Table"] == ["Dancer"] class TestCreation: """Test different instantiation behaviors""" def test_dict(self): char = npc...
Python
0.000139
@@ -721,856 +721,8 @@ %22%5D%0A%0A -class TestGetFirst:%0A def test_normal(self):%0A char = npc.Character(name=%5B%22hello%22, %22goodbye%22%5D)%0A assert char.get_first(%22name%22) == %22hello%22%0A%0A def test_desc(self):%0A char = npc.Character(description=%22Fee Fie Foe Fum%22)%0A ...
b447fa44ca1dd2e9d21af4ce61ee6092fe3c94ec
Update test_cmatrices to new interface
tests/test_cmatrices.py
tests/test_cmatrices.py
# to run this test, from directory above: # setenv PYTHONPATH /path/to/pyradiomics/radiomics # nosetests --nocapture -v tests/test_features.py import logging from nose_parameterized import parameterized import numpy import six from radiomics import cMatsEnabled, getFeatureClasses from testUtils import custom_name_fu...
Python
0
@@ -1019,28 +1019,24 @@ o(self, test -Case , featureCla @@ -1173,20 +1173,16 @@ s', test -Case , featur @@ -1284,20 +1284,16 @@ me, test -Case )%0A%0A t @@ -1322,16 +1322,26 @@ etImage( +'original' )%0A te @@ -1367,16 +1367,26 @@ getMask( +'original' )%0A%0A f
3b408ed7702100b7f1755f819e05bb61b1740957
add medialab events search- left todo: json and date
media_lab_prado.py
media_lab_prado.py
# http://medialab-prado.es/events/2016-12-01
Python
0
@@ -37,8 +37,914 @@ 16-12-01 +%0A# -*- coding: utf-8 -*-%0Afrom bs4 import BeautifulSoup%0Aimport urllib.request%0Aimport datetime%0A%0Adate = %222017-01-02%22%0A%0Aurl = %22http://medialab-prado.es/events/%22 + date%0Arequest = urllib.request.urlopen(url)%0A%0Aif request.getcode() == 200:%0A%09request = request.read(...
769e6209db066b8b5908426850fd300fd29098e8
Fix codemirror mode and language name
tcl_kernel/kernel.py
tcl_kernel/kernel.py
from ipykernel.kernelbase import Kernel try: import Tkinter except ImportError: import tkinter as Tkinter __version__ = '0.0.1' class TclKernel(Kernel): implementation = 'tcl_kernel' implementation_version = __version__ language_info = {'name': 'bash', 'codemirror_mode': 'shel...
Python
0.00003
@@ -265,12 +265,11 @@ ': ' -bash +Tcl ',%0A @@ -312,12 +312,10 @@ ': ' -shel +Tc l',%0A
c517eb40b73151a9b14f46f1991ab692d8b81702
Add docstring for simulation class methods
teemof/simulation.py
teemof/simulation.py
# Date: August 2017 # Author: Kutay B. Sezginel """ Simulation class for reading and initializing Lammps simulations """ import pprint from teemof.read import read_run, read_trial, read_trial_set from teemof.parameters import k_parameters, plot_parameters from teemof.visualize import plot_thermal_conductivity, plot_dis...
Python
0
@@ -492,16 +492,83 @@ opy()):%0A + %22%22%22%0A Create a Lammps simulation object.%0A %22%22%22%0A @@ -810,16 +810,101 @@ 'run'):%0A + %22%22%22%0A Read Lammps simulation results from given directory.%0A %22%22%22%0A @@ -1341,44 +1341,188 @@ -pass%0A...
b646e4f376db710101e2c1825bd384b2727e6a79
Disable on win32
tests/test_dateentry.py
tests/test_dateentry.py
import datetime import unittest from kiwi.ui.dateentry import DateEntry class TestDateEntry(unittest.TestCase): def setUp(self): self.date = datetime.date.today() def testGetSetDate(self): entry = DateEntry() entry.set_date(self.date) self.assertEqual(entry.get_date(), self.da...
Python
0.000002
@@ -1,12 +1,23 @@ +import sys%0A import datet @@ -204,32 +204,87 @@ tSetDate(self):%0A + if sys.platform == 'win32':%0A return%0A entry =
9033c3e95b07219f49171dd88f55a951852c9b8f
Reset the beacon rather than stopping it, in the hope that it will avoid bind-related issues & delays on the CI tests
tests/test_discovery.py
tests/test_discovery.py
try: import queue except ImportError: import Queue as queue import random import re import socket import threading import time import uuid import pytest import networkzero as nw0 _logger = nw0.core.get_logger("networkzero.tests") nw0.core._enable_debug_logging() is_valid_port = nw0.core.is_valid_port is_vali...
Python
0
@@ -1654,29 +1654,29 @@ 0.discovery. -_stop +reset _beacon)%0A%0Ade
78320df85a99b309c192a685f16f7c36b8b86c7c
add test to check that "in bounds" lat/lng do not throw.
tests/test_haversine.py
tests/test_haversine.py
from haversine import haversine, Unit from math import pi import pytest from tests.geo_ressources import LYON, PARIS, NEW_YORK, LONDON, EXPECTED_LYON_PARIS def haversine_test_factory(unit): def test(): expected = EXPECTED_LYON_PARIS[unit] assert haversine(LYON, PARIS, unit=unit) == expected ...
Python
0
@@ -2974,16 +2974,422 @@ False)%0A%0A +@pytest.mark.parametrize(%0A %22in_bounds_from,in_bounds_to%22, %5B%0A ((-90, 0), (0, 0)),%0A ((0, 0), (90, 0)),%0A ((0, -180), (0, 0)),%0A ((0, 0), (0, 180)),%0A %5D%0A)%0Adef test_in_bounds(in_bounds_from, in_bounds_to):%0A %22%22%22%0A T...
17ad68fe77b124fa760857c9e93cbd3d4f9d293e
Write XML of input file to tempdir as well
tests/test_hintfonts.py
tests/test_hintfonts.py
from __future__ import print_function, division, absolute_import import glob from os.path import basename import pytest from fontTools.misc.xmlWriter import XMLWriter from fontTools.cffLib import CFFFontSet from fontTools.ttLib import TTFont from psautohint.autohint import ACOptions, hintFiles from .differ import ma...
Python
0
@@ -952,17 +952,26 @@ me(otf)) + + %22.out%22 %0A - opti @@ -1123,36 +1123,60 @@ ter = XMLWriter( +str(tmpdir / basename( path +)) + %22.xml%22)%0A @@ -1267,19 +1267,43 @@ differ(%5B +str(tmpdir / basename( otf +)) + %22.xml @@ -1296,36 +1296,79 @@ (otf)) + %22.xml%22, - +%0A str...
6e67a9e8eedd959d9d0193e746a375099e9784ef
Use bytes instead of str where appropriate for Python 3
toodlepip/consoles.py
toodlepip/consoles.py
class Console(object): def __init__(self, shell, stdout): self._shell = shell self._stdout = stdout def run(self, description, command, **kwargs): return self.run_all(description, [command], **kwargs) def run_all(self, description, commands, quiet=False, cwd=None): ...
Python
0.000561
@@ -459,24 +459,25 @@ tdout.write( +b '%5C033%5B1m')%0A @@ -513,16 +513,31 @@ cription +.encode(%22utf8%22) )%0A @@ -557,16 +557,17 @@ t.write( +b %22%5Cn%22)%0A @@ -591,16 +591,17 @@ t.write( +b '%5C033%5B0m
8034a521692d9857b0d36e2efced40bb69f5efda
Refactor test for and operator
tests/test_operators.py
tests/test_operators.py
from pytest import mark from intervals import IntInterval class TestComparisonOperators(object): def test_eq_operator(self): assert IntInterval([1, 3]) == IntInterval([1, 3]) assert not IntInterval([1, 3]) == IntInterval([1, 4]) def test_ne_operator(self): assert not IntInterval([1, 3...
Python
0
@@ -2223,17 +2223,8 @@ ult' -, 'empty' ), ( @@ -2255,22 +2255,16 @@ , (3, 3) -, True ),%0A @@ -2291,22 +2291,16 @@ '%5B3, 3)' -, True ),%0A @@ -2326,23 +2326,16 @@ , (3, 5) -, False ),%0A @@ -2364,23 +2364,16 @@ , %5B3, 3%5D -, False ),%0A @@ -2405,23 +2405,16 @@ %5B3, 10%5D -, False ),...
5a817413b91adece6f5191d7fe0bf5b4baa430af
Fix test
tests/test_retrieval.py
tests/test_retrieval.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy from numpy.testing import assert_allclose from theano import tensor from dictlearn.vocab import Vocabulary from dictlearn.retrieval import ( vec2str, Dictionary, Retrieval) from dictlearn.ops...
Python
0.000004
@@ -1788,17 +1788,17 @@ top_k = -4 +7 # shoul
006e933a44241e30e1e54c24966d0859aa7c853d
test hub via vanilla, to check imports
tests/unit/test_core.py
tests/unit/test_core.py
import time import vanilla.core def test_lazy(): class C(object): @vanilla.core.lazy def now(self): return time.time() c = C() want = c.now time.sleep(0.01) assert c.now == want def test_Scheduler(): s = vanilla.core.Scheduler() s.add(4, 'f2') s.add(9, '...
Python
0
@@ -6,16 +6,31 @@ t time%0A%0A +import vanilla%0A import v @@ -839,27 +839,22 @@ vanilla. -core. Hub()%0A + @@ -1080,37 +1080,32 @@ h = vanilla. -core. Hub()%0A%0A d @@ -1304,32 +1304,32 @@ est_stop(self):%0A + h = vani @@ -1332,21 +1332,16 @@ vanilla. -core. Hub()%0A%0A
4f2de7a3ef26e26089626ded498e304df328591f
remove psutil checks (#5283)
tests/unit/test_info.py
tests/unit/test_info.py
import os import re import shutil import pytest from dvc.info import get_dvc_info, psutil # Python's version is in the shape of: # <major>.<minor>.<patch>[{a|b|rc}N][.postN][.devN] # `patch` is more than enough for the tests. # Refer PEP-0440 for complete regex just in-case. PYTHON_VERSION_REGEX = r"Python \d\.\d+\....
Python
0
@@ -80,16 +80,8 @@ info -, psutil %0A%0A# @@ -2409,65 +2409,8 @@ )%0A%0A%0A -@pytest.mark.skipif(psutil is None, reason=%22No psutil.%22)%0A def @@ -3013,65 +3013,8 @@ o%0A%0A%0A -@pytest.mark.skipif(psutil is None, reason=%22No psutil.%22)%0A def
f20e76034eef1ea8b7b7f98ace521a3a6346103c
remove default 0.0.0.0 for ip address to pave the way for a unique constraint on the ip address column. Of course this means that network_id needs to be nullable. All of this weakens this table in a way that is making me unhappy. This can and will be solved with more clever check constraints (i.e. network_id can't be n...
1.2.1/src/lib/python2.5/aquilon/aqdb/hw/interface.py
1.2.1/src/lib/python2.5/aquilon/aqdb/hw/interface.py
#!/ms/dist/python/PROJ/core/2.5.0/bin/python # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # $Header$ # $Change$ # $DateTime$ # $Author$ # Copyright (C) 2008 Morgan Stanley # # This module is part of Aquilon """Classes and Tables relating to network interfaces""" fro...
Python
0.000001
@@ -1548,25 +1548,23 @@ V4, -default='0.0.0.0' +nullable = True )%0A @@ -1747,20 +1747,19 @@ lable = -Fals +Tru e)%0A%0A @@ -2312,16 +2312,22 @@ name = ' +iface_ mac_addr @@ -2337,44 +2337,86 @@ '))%0A -Index('iface_ip_idx', interface.c.ip +interface.append_constraint(UniqueConstraint('ip', name = 'ifac...
bae05fd5c15e9360d09dd9456b6d4f1122ddf213
Print the url of dependency JARs being downloaded in buck build
tools/download_jar.py
tools/download_jar.py
#!/usr/bin/python # Copyright (C) 2013 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
Python
0.000603
@@ -1794,16 +1794,59 @@ e_ent))%0A + print %3E%3Estderr, %22Download %25s%22 %25 args.u%0A chec
659db558712a49c7d288b48e9f4b47b7f5b41f6a
Fix PyTorch wrapper
thinc/extra/wrappers.py
thinc/extra/wrappers.py
import contextlib from ..compat import BytesIO from ..neural._classes.model import Model try: import cupy import torch.autograd import torch.optim import torch import torch.utils.dlpack except ImportError: torch = None cupy = None pass def xp2torch(xp_tensor): if hasattr(xp_tensor,...
Python
0.00004
@@ -104,16 +104,58 @@ rt cupy%0A +except ImportError:%0A cupy = None%0A%0Atry:%0A impo @@ -282,33 +282,8 @@ None -%0A cupy = None%0A pass %0A%0Ade @@ -447,14 +447,18 @@ rch. -Tensor +from_numpy (xp_ @@ -1222,32 +1222,67 @@ ss.%0A '''%0A + x_torch = xp2torch(x_data)%0A x_var = ...
5d8b1a62882f37bb79e8d000e2b2ecb69742cce4
Add API endpoint for generating authentification token
timeside/server/urls.py
timeside/server/urls.py
# -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from rest_framework import routers from rest_framework.documentation import include_docs_urls from timeside.server import views from timeside.server.utils import TS_ENCODERS_EXT EXPORT_...
Python
0.000001
@@ -161,16 +161,79 @@ routers%0A +from rest_framework.authtoken import views as authtoken_views%0A%0A from res @@ -1517,16 +1517,139 @@ API')),%0A + # API endpoint for Generating Authentification token%0A url(r'%5Eapi/token-auth/', authtoken_views.obtain_auth_token),%0A # Ite
e3832f6301ea7e043552502f88c7b3a59e35d3bd
Improve formatting
tools/glidein_status.py
tools/glidein_status.py
#!/bin/env python # # glidein_status.py # # Description: # Equivalent to condor_status, but with glidein specific info # # Usage: # glidein_status.py [-help] [-gatekeeper] [-glidecluster] [-withmonitor] # # Author: # Igor Sfiligoi # import time import sys,os.path sys.path.append(os.path.join(sys.path[0],"../lib")...
Python
0.647729
@@ -4137,17 +4137,16 @@ %25len(c)%0A -%0A print co @@ -4301,15 +4301,59 @@ %5Bt%5D%5Bc%5D)%0A + print count_print_mask%25count_print_val%0A%0A print%0A%0A
4043468de4fc448b6fda670f33b7f935883793a7
add a test to ensure False is never passed to Git.execute
test/git/test_git.py
test/git/test_git.py
import os from test.testlib import * from git import Git, GitCommandError class TestGit(object): def setup(self): base = os.path.join(os.path.dirname(__file__), "../..") self.git = Git(base) @patch(Git, 'execute') def test_method_missing_calls_execute(self, git): git.return_value =...
Python
0
@@ -2390,8 +2390,283 @@ east 4k%0A +%0A @patch(Git, 'execute')%0A def test_it_ignores_false_kwargs(self, git):%0A # this_should_not_be_ignored=False implies it *should* be ignored%0A output = self.git.version( pass_this_kwarg=False )%0A assert_true( %22pass_this_kwarg%22 not in git.call_args...
90f057e0cd2bd0a50f2daed799aa902bdb31eab1
fix typeerror with blank reqs
test/test_package.py
test/test_package.py
import os import sys import pytest from shutil import rmtree from os import path from lambda_uploader import package TESTING_TEMP_DIR = '.testing_temp' WORKING_TEMP_DIR = path.join(TESTING_TEMP_DIR, '.lambda_uploader_temp') PACKAGE_TEMP_DIR = path.join(WORKING_TEMP_DIR, 'lambda_package') def setup_module(module): ...
Python
0.000001
@@ -2023,24 +2023,583 @@ pytest'))%0A%0A%0A +def test_install_no_requirements():%0A temp_workspace = path.join(TESTING_TEMP_DIR,%0A package.TEMP_WORKSPACE_NAME)%0A%0A pkg = package.Package(TESTING_TEMP_DIR)%0A pkg.requirements(%5B%5D)%0A pkg.install_dependencies()%0A%0A sit...
374e10b908fbedf73f3ad40634bb680206da0652
Add setUp
test/test_quality.py
test/test_quality.py
# -*- coding: utf-8 -*- import unittest from pychord import QualityManager, Chord class TestQuality(unittest.TestCase): def setUp(self): self.quality_manager = QualityManager() def test_eq(self): q1 = self.quality_manager.get_quality("m7-5") q2 = self.quality_manager.get_quality("m7...
Python
0.000002
@@ -1375,33 +1375,32 @@ .TestCase):%0A -%0A def test_overwri @@ -1391,22 +1391,13 @@ def -test_overwrite +setUp (sel @@ -1400,32 +1400,37 @@ (self):%0A +self. quality_manager @@ -1444,32 +1444,68 @@ tyManager()%0A +%0A - +def test_overwrite(self):%0A self. quality_mana @@ -1738,...
3707ed6b193a5eed9ec4505f6a283fdaff07ad5e
fix deprecated method
mifiel/api_auth.py
mifiel/api_auth.py
""" [ApiAuth](https://github.com/mgomes/api_auth) for python Based on https://github.com/pd/httpie-api-auth by Kyle Hargraves Usage: import requests requests.get(url, auth=ApiAuth(app_id, secret_key)) """ import hmac, base64, hashlib, datetime from requests.auth import AuthBase from urllib.parse import urlparse class...
Python
0.000053
@@ -1491,22 +1491,21 @@ 4.encode -string +bytes (digest)
c0894d3c14b8273364454dfa13c94311578ff698
update for diverse usage
mk-1strecurring.py
mk-1strecurring.py
#!/usr/bin/env python3 # (C) Mikhail Kolodin, 2018, ver. 1.0 # class ic test task: find 1st recurring character in a string import random import string MINSIZE = 1 # min size of test string MAXSIZE = 9 # its max size TESTS = 10 # no of tests alf = string.ascii_uppercase # test alphabet arr = []...
Python
0
@@ -53,12 +53,23 @@ ver. + 2018-05-31 1. -0 +1 %0A# c @@ -216,10 +216,10 @@ E = +1 9 - @@ -335,16 +335,17 @@ ze = 0%0A%0A +%0A def prep @@ -397,16 +397,17 @@ r, size%0A +%0A size @@ -504,16 +504,17 @@ ize)%5D)%0A%0A +%0A def solv @@ -534,34 +534,38 @@ ind char -%22%22%22%0A global arr +, reu...
e379f35a15956204f09aa593979fe0a0186cf56e
Update the upload tool
tools/upload_build.py
tools/upload_build.py
"""This script upload a newly-build version of CocoMUD for Windows. The Download wiki page on Redmine are updated. Requirements: This script needs 'python-redmine', which you can obtain with pip install python-redmine """ import argparse from json import dumps import os import re import sys import urll...
Python
0
@@ -306,22 +306,34 @@ sys%0A -import +from urllib -2 + import request %0A%0Afr @@ -865,17 +865,17 @@ print - +( %22The fil @@ -909,16 +909,17 @@ at(path) +) %0A sys @@ -957,17 +957,17 @@ le%0Aprint - +( %22Retriev @@ -1016,16 +1016,17 @@ ent'...%22 +) %0Apage = @@ -1093,17 +1093,17 @@ %22)%0Aprint...
9442f3375ee20baf677cbdcafdce0c1d5c1007a0
update stopping cluster
xpaw/cluster.py
xpaw/cluster.py
# coding=utf-8 import time import pickle import asyncio import threading import logging.config from collections import deque from xpaw.downloader import Downloader from xpaw.http import HttpRequest, HttpResponse from xpaw.loader import TaskLoader log = logging.getLogger(__name__) class LocalCluster: def __init...
Python
0
@@ -729,33 +729,34 @@ self._ -is_running = Fals +last_request = Non e%0A @@ -759,36 +759,31 @@ self._ -last_request +futures = None%0A%0A @@ -884,40 +884,8 @@ )))%0A - self._is_running = True%0A @@ -2022,32 +2022,63 @@ close()%0A%0A + self._futures = %5B%5D%0A f = as...
3e988a7c4b0d5407989af8c5ece6ed77a3646afd
Update __init__.py
otter/__init__.py
otter/__init__.py
""" Otter - output interruption library. Allows you to define output streams with the following characteristics: * streams start on a new line. * streams output to a sink. * other outputs to the sink constitute an interruption to the stream. Streams observe the sink to know when it is called. * interr...
Python
0.000005
@@ -3426,16 +3426,27 @@ not self + and output :%0A
3d331ecdb9cb0e64050eb3e4ece27242e1714b3e
Update C_Temperature_Vertical_sections.py
Cas_1/Temperature/C_Temperature_Vertical_sections.py
Cas_1/Temperature/C_Temperature_Vertical_sections.py
import numpy as np import matplotlib.pyplot as plt from xmitgcm import open_mdsdataset plt.ion() dir1 = '/homedata/bderembl/runmit/test_southatlgyre' ds1 = open_mdsdataset(dir1,iters='all',prefix=['T']) Height = ds1.T.Z print(Height) nx = int(len(ds1.T.XC)/2) print(nx) ny = int(len(ds1.T.YC)/2) print(ny) nt = -...
Python
0.000001
@@ -508,25 +508,25 @@ ction_xz_cas -4 +1 '+'.png')%0Apl @@ -699,9 +699,9 @@ _cas -4 +1 '+'.
2bcca13d5861c4ad1d65514f06c4d2fddfa473b8
replace distutils.spawn.find_executable with shtil.which
mod/tools/clion.py
mod/tools/clion.py
'''CLion helper functions''' import subprocess, os, shutil from mod import util, log, verb, dep from mod.tools import cmake from distutils.spawn import find_executable name = 'clion' platforms = ['osx','linux','win'] optional = True not_found = 'used as IDE with clion configs' #---------------------------------------...
Python
0.000001
@@ -126,46 +126,27 @@ rom -distutils.spawn import find_executable +shutil import which %0A%0Ana @@ -854,39 +854,29 @@ %0A if -find_executable +which (%22clion.sh%22) @@ -891,31 +891,21 @@ None or -find_executable +which (%22clion%22
b2542f8c3625150f9716eb0b1fcb44ee15520ae8
fix path to nvim files
mod/vim/install.py
mod/vim/install.py
import packages import util def run(): spell_dir = '~/.config/vim/spell/' choices = [ 'vim', 'gvim', # gvim supports for X11 clipboard, but has more dependencies ] choice = None while choice not in choices: choice = input('Which package to install? (%s) ' % choices).lower...
Python
0
@@ -525,28 +525,24 @@ .find('./../ -mod- nvim/*.vim') @@ -617,36 +617,32 @@ e_symlink('./../ -mod- nvim/spell/pl.ut @@ -696,12 +696,8 @@ /../ -mod- nvim
06912580de8ef1e781e8ebae46a4b886da38b8fe
add --verbose, --onetime options
trypython/__main__.py
trypython/__main__.py
""" trypython パッケージのメインファイルです. python インタープリターにて $ python -m trypython と起動した場合に実行されます。 """ import importlib import os import pathlib import sys from typing import Dict class ExampleLoadError(Exception): """サンプルのロード中にエラーが発生した場合の例外 Attributes: example_name (str): エラーが発生したモジュール名 """ def __in...
Python
0.000403
@@ -87,16 +87,32 @@ %E3%81%BE%E3%81%99%E3%80%82%0A%22%22%22%0A +import argparse%0A import i @@ -181,16 +181,49 @@ t Dict%0A%0A +onetime = False%0Averbose = False%0A%0A %0Aclass E @@ -1542,16 +1542,44 @@ %E3%81%8C%E8%A6%8B%E3%81%A4%E3%81%8B%E3%82%89%E3%81%AA%E3%81%84%0A + if verbose:%0A @@ ...
6d2e66ab5b9b452474701ffc5035e4a8106db637
Add test_Record unit tests
tests/test_Record.py
tests/test_Record.py
# import unittest # # import os, shutil # # from GeometrA.src.Record import * # from GeometrA.src.File.WorkSpace import WorkSpace # # RECORD_FILE = './tests/record.log' # # class RecordTestSuite(unittest.TestCase): # @classmethod # def setUpClass(cls): # path = './tests/Project0' # if os.path.is...
Python
0.000001
@@ -1,14 +1,12 @@ -# import unitt @@ -9,20 +9,17 @@ nittest%0A -#%0A# +%0A import o @@ -28,20 +28,17 @@ shutil%0A -#%0A# +%0A from Geo @@ -63,18 +63,16 @@ mport *%0A -# from Geo @@ -113,20 +113,17 @@ rkSpace%0A -#%0A# +%0A RECORD_F @@ -149,20 +149,17 @@ rd.log'%0A -#%0A# +%0A class Re @@ -188,26 +188,...
36e066ae645eb9b874ff1ce814708bd024c519e0
add support to get git revision from toymaker.
toymakerlib/toymaker.py
toymakerlib/toymaker.py
#! /usr/bin/env python import sys import os import getopt import optparse import traceback import toydist from toydist.core.utils import \ subst_vars, pprint from toydist.core.platforms import \ get_scheme from toydist.core.descr_parser import \ ParseError from toydist.commands.core import \ ...
Python
0
@@ -1945,24 +1945,54 @@ ion = False%0A + show_full_version = False%0A cmd_name @@ -2095,16 +2095,32 @@ version%22 +, %22full-version%22 %5D)%0A @@ -2296,16 +2296,99 @@ n = True +%0A if opt in (%22--full-version%22):%0A show_full_version = True %0A%0A @@ -2711,24 +2711,1...
d9407ebda411d49212da35e27f08718dade1cd02
Support Info is unable to read package version and git version
modules/support.py
modules/support.py
# -*- coding: utf-8 -*- """Support Information module. The module provides functions to gain information to be included in issues. It neither contains normal functionality nor is it used by GitGutter. """ import os import subprocess import textwrap import sublime import sublime_plugin PACKAGE = os.path.basename(os.p...
Python
0
@@ -282,23 +282,63 @@ plugin%0A%0A +# get absolute path of the package%0A PACKAGE +_PATH = os.pa @@ -344,12 +344,11 @@ ath. -base +dir name @@ -376,48 +376,384 @@ ath. -dir +abspath(__file__)))%0Aif os.path.isfile(PACKAGE_PATH):%0A # Package is a PACKAGE.sublime-package so get its file name -( %0A -os.p...
659bd0a11bb1460784afc50818be376d112bbfc8
Test _ravel_shape_indices
tests/test__utils.py
tests/test__utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import operator import pytest import numpy as np import dask.array as da import dask.array.utils as dau import dask_ndmeasure._utils def test__norm_input_labels_index_err(): shape = (15, 16) chunks = (4, 5) ind = No...
Python
0
@@ -2586,8 +2586,432 @@ l_mtch)%0A +%0A%0A@pytest.mark.parametrize(%0A %22shape, chunks%22, %5B%0A ((15,), (4,)),%0A ((15, 16), (4, 5)),%0A ((15, 1, 16), (4, 1, 5)),%0A ((15, 12, 16), (4, 5, 6)),%0A %5D%0A)%0Adef test___ravel_shape_indices(shape, chunks):%0A a = np.arange(int(np.pr...
3425c2c9d19c1d0a54dafde6cc70d571421c82a9
Fix string app import error for python 3.5
tests/test_config.py
tests/test_config.py
import logging import socket import pytest from uvicorn import protocols from uvicorn.config import Config from uvicorn.middleware.debug import DebugMiddleware from uvicorn.middleware.wsgi import WSGIMiddleware async def asgi_app(): pass def wsgi_app(): pass def test_debug_app(): config = Config(app...
Python
0.999224
@@ -872,22 +872,14 @@ ses( -ModuleNotFound +Import Erro
dcfda9f906d417ee3a62d3125f052bfad074100c
Add case-match label
yargy/labels.py
yargy/labels.py
GENDERS = ("masc", "femn", "neut", "Ms-f", "GNdr") NUMBERS = ("sing", "plur", "Pltm") def get_token_features(candidate, case, grammemes): return ((g in t["grammemes"] for g in grammemes) for t in (case, candidate)) def is_lower_label(token, _, stack): return token[1].islower() def is_upper_label(token, _, st...
Python
0.000483
@@ -78,16 +78,105 @@ %22Pltm%22) +%0ACASES = (%22nomn%22, %22gent%22, %22datv%22, %22accs%22, %22ablt%22, %22loct%22, %22voct%22, %22gen2%22, %22acc2%22, %22loc2%22) %0A%0Adef ge @@ -3560,24 +3560,452 @@ turn False%0A%0A +def case_match_label(token, index, stack, cases=CASES):%0A for candidate_form in token%5B3%...
1df8efb63333e89777820a96d78d5a59252b303d
Rename test specific to with gpg
tests/test_config.py
tests/test_config.py
import unittest import figgypy.config import sys import os class TestConfig(unittest.TestCase): def test_config_load(self): os.environ['FIGGY_GPG_HOME']='tests/resources/test-keys' c = figgypy.config.Config('tests/resources/test-config.yaml') self.assertEqual(c.db['host'], 'db.heck.ya') ...
Python
0
@@ -115,16 +115,25 @@ fig_load +_with_gpg (self):%0A
7fc5fdba58880c782af54b669070592277b67583
Test decode binary with negative length
tests/test_decode.py
tests/test_decode.py
# coding: utf-8 import termformat from unittest import TestCase class TermFormatDecoderTest(TestCase): def test_decode_atom(self): result = termformat.decode(b"\x83d\x00\x03foo") self.assertEqual(result, ":foo") def test_decode_incomplete_atom(self): with self.assertRaises(ValueError): result ...
Python
0.999996
@@ -2377,32 +2377,226 @@ result, %22foo%22)%0A%0A + def test_decode_binary_with_negative_length(self):%0A with self.assertRaises(ValueError):%0A result = termformat.decode(b%22%5Cx83m%5Cxff%5Cxff%5Cxff%5Cxfdfoo%22)%0A self.assertEqual(result, %22foo%22)%0A%0A def test_decod
c5f44c9dda9905e9aa817c1945d49892e686f9cd
Fix failing test
tests/test_models.py
tests/test_models.py
# -*- coding: utf-8 -*- import datetime as dt import pytest from doorman.models import Node, Pack, Query, Tag, FilePath from .factories import NodeFactory, PackFactory, QueryFactory, TagFactory @pytest.mark.usefixtures('db') class TestNode: def test_factory(self, db): node = NodeFactory(host_identi...
Python
0.000209
@@ -1689,85 +1689,8 @@ ()%0A%0A - assert node.host_identifier == config%5B'options'%5D%5B'host_identifier'%5D%0A%0A