diff
stringlengths
139
3.65k
message
stringlengths
8
627
diff_languages
stringclasses
1 value
diff --git a/aioxmpp/node.py b/aioxmpp/node.py index <HASH>..<HASH> 100644 --- a/aioxmpp/node.py +++ b/aioxmpp/node.py @@ -680,6 +680,10 @@ class PresenceManagedClient(AbstractClient): an `available` presence, the client will attempt to connect to the server. If the presence is `unavailable` and the client is currently connected, it will disconnect. + + Instead of setting the presence to unavailable, :meth:`stop` can also + be called. The :attr:`presence` attribute is *not* affected by calls to + :meth:`start` or :meth:`stop`. """ return self._presence
Clarify use of stop in PresenceManagedClient
py
diff --git a/more_itertools/more.py b/more_itertools/more.py index <HASH>..<HASH> 100644 --- a/more_itertools/more.py +++ b/more_itertools/more.py @@ -874,6 +874,9 @@ def stagger(iterable, offsets=(-1, 0, 1), longest=False, fillvalue=None): >>> list(stagger([0, 1, 2, 3], longest=True)) [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)] + By default, ``None`` will be used to replace offsets beyond the end of the + sequence. Specify *fillvalue* to use some other value. + """ children = tee(iterable, len(offsets)) @@ -889,6 +892,9 @@ def zip_offset(*iterables, **kwargs): >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1))) [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')] + This can be used as a lightweight alternative to SciPy or pandas to analyze + data sets in which somes series have a lead or lag relationship. + By default, the sequence will end when the shortest iterable is exhausted. To continue until the longest iterable is exhausted, set *longest* to ``True``.
Update docstrings for zip_offset and stagger
py
diff --git a/intake/catalog/default.py b/intake/catalog/default.py index <HASH>..<HASH> 100644 --- a/intake/catalog/default.py +++ b/intake/catalog/default.py @@ -68,7 +68,7 @@ def which(program): def global_data_dir(): """Return the global Intake catalog dir for the current environment""" - + prefix = False if VIRTUALENV_VAR in os.environ: prefix = os.environ[VIRTUALENV_VAR] elif CONDA_VAR in os.environ:
Fix failure to find appdir when there is no prefix
py
diff --git a/rest_framework_swagger/tests.py b/rest_framework_swagger/tests.py index <HASH>..<HASH> 100644 --- a/rest_framework_swagger/tests.py +++ b/rest_framework_swagger/tests.py @@ -1302,6 +1302,7 @@ class BaseMethodIntrospectorTest(TestCase, DocumentationGeneratorMixin): self.assertIn( properties["choice"]["type"], ["choice", "multiple choice"]) + self.assertIn("enum", properties["choice"].keys()) self.assertEqual("string", properties["regex"]["type"]) self.assertEqual("number", properties["float"]["type"]) self.assertEqual("float", properties["float"]["format"])
Added test coverage to ensure enums included for choices
py
diff --git a/salt/fileserver/__init__.py b/salt/fileserver/__init__.py index <HASH>..<HASH> 100644 --- a/salt/fileserver/__init__.py +++ b/salt/fileserver/__init__.py @@ -59,7 +59,7 @@ def reap_fileserver_cache_dir(cache_base, find_func): for root, dirs, files in os.walk(env_base): # if we have an empty directory, lets cleanup # This will only remove the directory on the second time "_reap_cache" is called (which is intentional) - if len(dirs) == 0 and len (files) == 0: + if len(dirs) == 0 and len(files) == 0: os.rmdir(root) continue # if not, lets check the files in the directory
Fix `pep8` `E<I>` issues.
py
diff --git a/astropy_helpers/utils.py b/astropy_helpers/utils.py index <HASH>..<HASH> 100644 --- a/astropy_helpers/utils.py +++ b/astropy_helpers/utils.py @@ -13,6 +13,9 @@ import warnings try: from importlib import machinery as import_machinery + # Python 3.2 does not have SourceLoader + if not hasattr(import_machinery, 'SourceLoader'): + import_machinery = None except ImportError: import_machinery = None
SourceLoader does not exist in Python <I>
py
diff --git a/goatools/associations.py b/goatools/associations.py index <HASH>..<HASH> 100755 --- a/goatools/associations.py +++ b/goatools/associations.py @@ -135,7 +135,7 @@ def read_ncbi_gene2go(fin_gene2go, taxids=None, **kws): if taxid2asscs is not None: taxid2asscs[taxid_curr]['GeneID2GOs'][geneid].add(go_id) taxid2asscs[taxid_curr]['GO2GeneIDs'][go_id].add(geneid) - sys.stdout.write(" READ: {ASSC}\n".format(ASSC=fin_gene2go)) + sys.stdout.write(" {N:,} items READ: {ASSC}\n".format(N=len(id2gos), ASSC=fin_gene2go)) return id2gos # return simple associations def get_gaf_hdr(fin_gaf):
When writing file, print number of GOEA items printed as well as filename
py
diff --git a/openquake/baselib/parallel.py b/openquake/baselib/parallel.py index <HASH>..<HASH> 100644 --- a/openquake/baselib/parallel.py +++ b/openquake/baselib/parallel.py @@ -170,8 +170,10 @@ from openquake.baselib.general import ( split_in_blocks, block_splitter, AccumDict, humansize, CallableDict, gettemp) -GB = 1024 ** 3 +sys.setrecursionlimit(1200) # raised a bit to make pickle happier +# see https://github.com/gem/oq-engine/issues/5230 submit = CallableDict() +GB = 1024 ** 3 @submit.add('no')
Raised a bit the recursion limit [skip CI]
py
diff --git a/Xlib/keysymdef/xf86.py b/Xlib/keysymdef/xf86.py index <HASH>..<HASH> 100644 --- a/Xlib/keysymdef/xf86.py +++ b/Xlib/keysymdef/xf86.py @@ -159,6 +159,25 @@ XK_XF86_Green = 0x1008FFA4 XK_XF86_Yellow = 0x1008FFA5 XK_XF86_Blue = 0x1008FFA6 +XK_XF86_Suspend = 0x1008FFA7 +XK_XF86_Hibernate = 0x1008FFA8 +XK_XF86_TouchpadToggle = 0x1008FFA9 +XK_XF86_TouchpadOn = 0x1008FFB0 +XK_XF86_TouchpadOff = 0x1008FFB1 + +XK_XF86_AudioMicMute = 0x1008FFB2 + +XK_XF86_Keyboard = 0x1008FFB3 + +XK_XF86_WWAN = 0x1008FFB4 +XK_XF86_RFKill = 0x1008FFB5 + +XK_XF86_AudioPreset = 0x1008FFB6 + +XK_XF86_RotationLockToggle = 0x1008FFB7 + +XK_XF86_FullScreen = 0x1008FFB8 + XK_XF86_Switch_VT_1 = 0x1008FE01 XK_XF86_Switch_VT_2 = 0x1008FE02 XK_XF86_Switch_VT_3 = 0x1008FE03
Update xf<I>.py with new keysyms Suspend, hibernate, touchpad controls, microphone toggle, WWAN, RFKill, Audio preset, rotation lock toggle and full screen. These "new" keysyms were taken from `/usr/include/X<I>/XF<I>keysym.h`
py
diff --git a/pprofile.py b/pprofile.py index <HASH>..<HASH> 100755 --- a/pprofile.py +++ b/pprofile.py @@ -681,6 +681,7 @@ class StatisticalThread(threading.Thread, ProfileRunnerBase): """ _test = None _start_time = None + clean_exit = False def __init__(self, profiler, period=.001, single=True, group=None, name=None): """ @@ -744,6 +745,7 @@ class StatisticalThread(threading.Thread, ProfileRunnerBase): frame = None wait() stop_event.clear() + self.clean_exit = True def callgrind(self, *args, **kw): return self.profiler.callgrind(*args, **kw) @@ -885,6 +887,10 @@ def main(): convertPath(name), ''.join(lines) ) + if options.statistic and not prof.clean_exit: + # Mostly useful for regresion testing, as exceptions raised in threads + # do not change exit status. + sys.exit(1) if __name__ == '__main__': main()
Exit with non-zero status when StatisticalThread raised. Otherwise, regressions in statistical profiling do not show in automated tests.
py
diff --git a/tests/test_game.py b/tests/test_game.py index <HASH>..<HASH> 100644 --- a/tests/test_game.py +++ b/tests/test_game.py @@ -44,7 +44,7 @@ class TestGame(unittest.TestCase): self.assertEqual(game.away_team_errors, 2) self.assertEqual(game.away_team_hits, 6) self.assertEqual(game.away_team_runs, 1) - self.assertEqual(game.date, datetime(2016, 8, 2, 18, 10)) + self.assertEqual(game.date, datetime(2016, 8, 2, 19, 10)) self.assertEqual(game.game_id, '2016_08_02_nyamlb_nynmlb_1') self.assertEqual(game.game_league, 'AN') self.assertEqual(game.game_start_time, '7:10PM')
Fix test_game.py This makes it consistent with my recent GameScoreboard.date change.
py
diff --git a/hpfeeds/protocol.py b/hpfeeds/protocol.py index <HASH>..<HASH> 100644 --- a/hpfeeds/protocol.py +++ b/hpfeeds/protocol.py @@ -123,12 +123,22 @@ class Unpacker(object): raise StopIteration('No message.') ml, opcode = struct.unpack('!iB', self.buf[0:5]) - if ml > SIZES.get(opcode, MAXBUF): - raise ProtocolException('Not respecting MAXBUF.') + max_ml = SIZES.get(opcode, MAXBUF) + + if ml > max_ml: + raise ProtocolException('Pending message (op: {opcode}, ml: {ml}) not respecting MAXBUF (in this case, {max_ml}).'.format( + opcode=opcode, + ml=ml, + max_ml=max_ml, + )) if len(self.buf) < ml: raise StopIteration('No message.') data = bytearray(self.buf[5:]) del self.buf[:ml] + + if opcode < OP_ERROR or opcode > OP_UNSUBSCRIBE: + raise ProtocolException('Unknown opcode: {}'.format(opcode)) + return opcode, data
Harden protocol decoder against state synchronisation issues
py
diff --git a/cuttlepool.py b/cuttlepool.py index <HASH>..<HASH> 100644 --- a/cuttlepool.py +++ b/cuttlepool.py @@ -61,7 +61,7 @@ class CuttlePool(object): def __del__(self): try: self._close_connections() - except: + except Exception: pass @property @@ -136,10 +136,8 @@ class CuttlePool(object): """ with self.lock: for con in self._reference_pool: - try: + if self.ping(con): con.close() - except: - pass while not self._pool.empty(): try:
remove bare exceptions (resolve #<I>, resolve #<I>)
py
diff --git a/housekeeper/pipelines/mip/collect.py b/housekeeper/pipelines/mip/collect.py index <HASH>..<HASH> 100644 --- a/housekeeper/pipelines/mip/collect.py +++ b/housekeeper/pipelines/mip/collect.py @@ -60,8 +60,7 @@ def analysis(config_path, analysis_id=None): meta_output = build_meta(new_objs['case'].name, new_objs['run'], qcped) - tmp_dir = tempfile.mkdtemp() - meta_path = "{}/meta.yaml".format(tmp_dir) + meta_path = "{}/meta.yaml".format(config['outDataDir']) with open(meta_path, 'w') as out_handle: out_handle.write(meta_output)
store meta info file under outDataDir to avoid linking issues
py
diff --git a/pyof/foundation/basic_types.py b/pyof/foundation/basic_types.py index <HASH>..<HASH> 100644 --- a/pyof/foundation/basic_types.py +++ b/pyof/foundation/basic_types.py @@ -185,6 +185,9 @@ class HWAddress(GenericType): def pack(self, value=None): """Pack the value as a binary representation. + If the passed value (or the self._value) is zero (int), then the pack + will assume that the value to be packed is '00:00:00:00:00:00'. + Returns bytes: The binary representation. @@ -194,10 +197,13 @@ class HWAddress(GenericType): if isinstance(value, type(self)): return value.pack() - if value is not None: - value = value.split(':') - else: - value = self._value.split(':') + if value is None: + value = self._value + + if value == 0: + value = '00:00:00:00:00:00' + + value = value.split(':') try: return struct.pack('!6B', *[int(x, 16) for x in value])
Improving pack method of HWAddress to accept zero int as value
py
diff --git a/gwpy/frequencyseries/core.py b/gwpy/frequencyseries/core.py index <HASH>..<HASH> 100644 --- a/gwpy/frequencyseries/core.py +++ b/gwpy/frequencyseries/core.py @@ -162,8 +162,8 @@ class FrequencySeries(Series): This method applies the necessary normalisation such that the condition holds: - >>> timeseries = TimeSeries([1.0, 0.0, -1.0, 0.0], sample_rate=1.0) - >>> timeseries.fft().ifft() == timeseries + >>> timeseries = TimeSeries([1.0, 0.0, -1.0, 0.0], sample_rate=1.0) + >>> timeseries.fft().ifft() == timeseries """ from ..timeseries import TimeSeries nout = (self.size - 1) * 2
FrequencySeries.ifft: minor docstring change
py
diff --git a/scenarios/kubernetes_e2e.py b/scenarios/kubernetes_e2e.py index <HASH>..<HASH> 100755 --- a/scenarios/kubernetes_e2e.py +++ b/scenarios/kubernetes_e2e.py @@ -51,8 +51,8 @@ DEFAULT_AWS_ZONES = [ 'ap-southeast-2a', 'ap-southeast-2b', 'ap-southeast-2c', - 'ca-central-1a', - 'ca-central-1b', + #'ca-central-1a', no c4.large capacity 2018-04-25 + #'ca-central-1b', no c4.large capacity 2018-04-25 'eu-central-1a', 'eu-central-1b', 'eu-central-1c',
AWS: remove ca-central-1 regions No c4.large availability presently.
py
diff --git a/lib/util.py b/lib/util.py index <HASH>..<HASH> 100644 --- a/lib/util.py +++ b/lib/util.py @@ -148,6 +148,7 @@ def download(url, filename): # I don't know why. requests.get works. Do what works. # urllib.urlretrieve(url, filename) response = requests.get(url, stream=True) + response.raise_for_status() with open(filename, 'wb') as file: for chunk in response.iter_content(chunk_size=1024): if chunk:
Fail loudly if a download fails.
py
diff --git a/jenkins/bootstrap.py b/jenkins/bootstrap.py index <HASH>..<HASH> 100755 --- a/jenkins/bootstrap.py +++ b/jenkins/bootstrap.py @@ -1057,7 +1057,7 @@ def bootstrap(args): setup_credentials(call, args.service_account, upload) try: maybe_upload_podspec(call, paths.artifacts, gsutil, os.getenv) - except subprocess.CalledProcessError, exc: + except (OSError, subprocess.CalledProcessError), exc: logging.error("unable to upload podspecs: %s", exc) setup_root(call, args.root, repos, args.ssh, args.git_cache, args.clean) logging.info('Configure environment...')
Catch OSError from kubectl too.
py
diff --git a/tests/test_finance.py b/tests/test_finance.py index <HASH>..<HASH> 100644 --- a/tests/test_finance.py +++ b/tests/test_finance.py @@ -20,7 +20,6 @@ import pytz from unittest2 import TestCase from datetime import datetime, timedelta -from collections import defaultdict from nose.tools import timed @@ -43,8 +42,6 @@ EXTENDED_TIMEOUT = 90 class FinanceTestCase(TestCase): - leased_sockets = defaultdict(list) - def setUp(self): self.zipline_test_config = { 'sid': 133,
Removes leased sockets from unit test. The leased sockets were from a previous architecture.
py
diff --git a/src/cr/cube/__init__.py b/src/cr/cube/__init__.py index <HASH>..<HASH> 100644 --- a/src/cr/cube/__init__.py +++ b/src/cr/cube/__init__.py @@ -2,4 +2,4 @@ """Initialization module for crunch-cube package.""" -__version__ = "3.0.10a7" +__version__ = "3.0.10a8"
release: prepare <I>a8 release
py
diff --git a/angr/exploration_techniques/tracer.py b/angr/exploration_techniques/tracer.py index <HASH>..<HASH> 100644 --- a/angr/exploration_techniques/tracer.py +++ b/angr/exploration_techniques/tracer.py @@ -809,7 +809,7 @@ class Tracer(ExplorationTechnique): # first check: are we just executing user-controlled code? if not state.ip.symbolic and state.mem[state.ip].char.resolved.symbolic: l.debug("executing input-related code") - return state + return state, state state = state.copy() state.options.add(sim_options.COPY_STATES)
Return current state as last and crash state when executing user controlled code in tracer exploration
py
diff --git a/tests/forces_and_virial.py b/tests/forces_and_virial.py index <HASH>..<HASH> 100755 --- a/tests/forces_and_virial.py +++ b/tests/forces_and_virial.py @@ -250,7 +250,7 @@ def run_forces_and_virial_test(test=None): for mask in masks: if test is None and mask is not None: print '--- using random mask ---' - c.set_mask(mask) + c.set_mask(mask) ffd, f0, maxdf = test_forces(a, dx=dx)
Bug fix: Need to clear mask for next test without mask.
py
diff --git a/rarfile.py b/rarfile.py index <HASH>..<HASH> 100644 --- a/rarfile.py +++ b/rarfile.py @@ -1287,7 +1287,7 @@ def rar3_s2k(psw, salt): cnt = S_LONG.pack(i*0x4000 + j) h.update(seed + cnt[:3]) if j == 0: - iv += h.digest()[-1] + iv += h.digest()[19:20] key_be = h.digest()[:16] key_le = pack("<LLLL", *unpack(">LLLL", key_be)) return key_le, iv
Make encrypted headers work on Python <I> bytes(..)[x] is not bytes() but int, use [x:y] to get bytes()
py
diff --git a/angr/storage/file.py b/angr/storage/file.py index <HASH>..<HASH> 100644 --- a/angr/storage/file.py +++ b/angr/storage/file.py @@ -184,7 +184,7 @@ class SimFile(SimFileBase, SimSymbolicMemory): """ Return a concretization of the contents of the file, as a flat bytestring. """ - size = self.state.solver.eval(self._size, **kwargs) + size = self.state.solver.min(self._size, **kwargs) data = self.load(0, size) kwargs['cast_to'] = kwargs.get('cast_to', str)
Use min of filesize while concretizing SimFiles
py
diff --git a/source/rafcon/core/states/container_state.py b/source/rafcon/core/states/container_state.py index <HASH>..<HASH> 100644 --- a/source/rafcon/core/states/container_state.py +++ b/source/rafcon/core/states/container_state.py @@ -673,9 +673,20 @@ class ContainerState(State): enclosed_t_id_dict = {} # re-create states + old_state_ids = [state.state_id for state in child_states] for child_state in child_states: + old_state_id = child_state.state_id + # needed to change state id here because not handled in add state and to avoid old state ids + new_id = None + if child_state.state_id in self.states.keys(): + new_id = state_id_generator(used_state_ids=self.states.keys() + old_state_ids + [self.state_id]) + child_state.change_state_id(new_id) new_state_id = self.add_state(child_state) - state_id_dict[child_state.state_id] = new_state_id + if new_id is not None and not new_id == new_state_id: + logger.error("In group the changed state id should not be changed again by add_state because it " + "could become a old_state_id again and screw data flows and transitions.") + # remember new and old state id relations + state_id_dict[old_state_id] = new_state_id # re-create scoped variables for sv in child_scoped_variables: name = sv.name
fix(ungroup state): handle correct duplicated state ids in new parent The previous implementation was not robust concerning state id consistency. The new should secure this state id consistency for states, data flows and transitions. Fix issue #<I>.
py
diff --git a/sorl/thumbnail/images.py b/sorl/thumbnail/images.py index <HASH>..<HASH> 100644 --- a/sorl/thumbnail/images.py +++ b/sorl/thumbnail/images.py @@ -228,7 +228,7 @@ class UrlStorage(Storage): def delete_all_thumbnails(): storage = default.storage - path = os.path.join(storage.location, settings.THUMBNAIL_PREFIX) + path = settings.THUMBNAIL_PREFIX def walk(path): dirs, files = storage.listdir(path)
Fix delete_all_thumbnails command. Paths are always relative to storage location.
py
diff --git a/astor/code_gen.py b/astor/code_gen.py index <HASH>..<HASH> 100644 --- a/astor/code_gen.py +++ b/astor/code_gen.py @@ -144,7 +144,7 @@ class SourceGenerator(ExplicitNodeVisitor): """This visitor is able to transform a well formed syntax tree into Python sourcecode. - For more details have a look at the docstring of the `node_to_source` + For more details have a look at the docstring of the `to_source` function. """
Fix typo in SourceGenerator docstring (#<I>)
py
diff --git a/organizations/backends/defaults.py b/organizations/backends/defaults.py index <HASH>..<HASH> 100644 --- a/organizations/backends/defaults.py +++ b/organizations/backends/defaults.py @@ -150,9 +150,9 @@ class BaseBackend(object): display_name = sender.get_full_name() else: display_name = sender.get_username() - from_email = "%s %s <%s>" % (display_name, + from_email = "%s <%s>" % (display_name, email.utils.parseaddr(settings.DEFAULT_FROM_EMAIL)[1]) - reply_to = "%s %s <%s>" % (display_name, sender.email) + reply_to = "%s <%s>" % (display_name, sender.email) else: from_email = settings.DEFAULT_FROM_EMAIL reply_to = from_email
Update defaults.py This is why editing code through GitHub can be troublesome
py
diff --git a/dwave/system/composites/tiling.py b/dwave/system/composites/tiling.py index <HASH>..<HASH> 100644 --- a/dwave/system/composites/tiling.py +++ b/dwave/system/composites/tiling.py @@ -170,7 +170,7 @@ class TilingComposite(dimod.Sampler, dimod.Composite, dimod.Structured): else: warnings.warn("Incomplete solver topology information." "Falling back to unsafe legacy branch.", - warnings.DeprecationWarning) + DeprecationWarning) # assume square lattice shape, and high yield, chimera system m = n = int(ceil(sqrt(ceil(len(sampler.structure.nodelist) / nodes_per_cell))))
DeprecationError call corrected.
py
diff --git a/taskw/warrior.py b/taskw/warrior.py index <HASH>..<HASH> 100644 --- a/taskw/warrior.py +++ b/taskw/warrior.py @@ -371,8 +371,7 @@ class TaskWarriorExperimental(TaskWarriorBase): def _execute(self, *args): """ Execute a given taskwarrior command with arguments - Returns a 2-tuple having stdout and stderr results as its - elements in the first and second index respectively. + Returns a 2-tuple of stdout and stderr (respectively). """ command = [
There is no reason for me to have written such a complicated sentence.
py
diff --git a/gns3converter/__init__.py b/gns3converter/__init__.py index <HASH>..<HASH> 100644 --- a/gns3converter/__init__.py +++ b/gns3converter/__init__.py @@ -12,6 +12,5 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from pkg_resources import get_distribution from .converter import Converter -__version__ = get_distribution('gns3-converter').version +__version__ = '0.1.0'
Define version statically, to ease freezing for Windows
py
diff --git a/windpowerlib/wind_turbine_cluster.py b/windpowerlib/wind_turbine_cluster.py index <HASH>..<HASH> 100644 --- a/windpowerlib/wind_turbine_cluster.py +++ b/windpowerlib/wind_turbine_cluster.py @@ -88,3 +88,14 @@ class WindTurbineCluster(object): wind_farm in self.wind_farms) / self.get_installed_power()) return self + def get_installed_power(self): + r""" + Calculates the installed power of a wind turbine cluster. + + Returns + ------- + float + Installed power of the wind turbine cluster. + + """ + return sum(wind_farm.installed_power for wind_farm in self.wind_farms)
Add function for installed power of turbine cluster
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,6 +9,7 @@ setup( 'a Python package for converting country names ' 'between different classifications schemes.'), long_description=open('README.rst').read(), + license='GNU General Public License v3 (GPLv3)', url='https://github.com/konstantinstadler/country_converter', author='Konstantin Stadler', author_email='konstantin.stadler@ntnu.no',
adding license metadata to setup.py (#<I>)
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,8 @@ from unittest import TextTestRunner, TestLoader here = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(here, 'VERSION.txt')) as f: + VERSION = f.read() with open(os.path.join(here, 'requirements.txt')) as f: REQUIREMENTS = f.read() @@ -29,7 +31,7 @@ class TestCommand(Command): setup( name='nesasm', - version='0.0.3', + version=VERSION, description='NES Assembly Compiler', author='Gustavo Maia Neto (Guto Maia)', author_email='guto@guto.net',
added version from VERSION.txt
py
diff --git a/tenant_schemas/postgresql_backend/base.py b/tenant_schemas/postgresql_backend/base.py index <HASH>..<HASH> 100644 --- a/tenant_schemas/postgresql_backend/base.py +++ b/tenant_schemas/postgresql_backend/base.py @@ -74,7 +74,7 @@ class DatabaseWrapper(original_backend.DatabaseWrapper): self.schema_name = get_public_schema_name() self.set_settings_schema(self.schema_name) self.search_path_set = False - + def set_settings_schema(self, schema_name): self.settings_dict['SCHEMA'] = schema_name @@ -116,8 +116,16 @@ class DatabaseWrapper(original_backend.DatabaseWrapper): search_paths = [self.schema_name] search_paths.extend(EXTRA_SEARCH_PATHS) - cursor.execute('SET search_path = {0}'.format(','.join(search_paths))) - self.search_path_set = True + # In the event that an error already happened in this transaction and we are going + # to rollback we should just ignore database error when setting the search_path + # if the next instruction is not a rollback it will just fail also, so + # we do not have to worry that it's not the good one + try: + cursor.execute('SET search_path = {0}'.format(','.join(search_paths))) + except DatabaseError: + self.search_path_set = False + else: + self.search_path_set = True return cursor
Hide database errors when setting the search path It's needed to allow ROLLBACK to be executed on the DB. It resolves issue #<I>.
py
diff --git a/cassandra/io/asyncorereactor.py b/cassandra/io/asyncorereactor.py index <HASH>..<HASH> 100644 --- a/cassandra/io/asyncorereactor.py +++ b/cassandra/io/asyncorereactor.py @@ -279,9 +279,6 @@ class AsyncoreLoop(object): if not self._thread: return - # The loop shouldn't be woken up from here onwards since it won't be running - self._loop_dispatcher._notified = True - log.debug("Waiting for event loop thread to join...") self._thread.join(timeout=1.0) if self._thread.is_alive(): @@ -293,10 +290,11 @@ class AsyncoreLoop(object): # Ensure all connections are closed and in-flight requests cancelled for conn in tuple(_dispatcher_map.values()): - conn.close() - # The event loop should be closed, so we call remaining asyncore.close - # callbacks from here + if conn is not self._loop_dispatcher: + conn.close() self._timers.service_timeouts() + # Once all the connections are closed, close the dispatcher + self._loop_dispatcher.close() log.debug("Dispatchers were closed")
Close dispatcher last when cleaning asyncore connections
py
diff --git a/pywb/__init__.py b/pywb/__init__.py index <HASH>..<HASH> 100644 --- a/pywb/__init__.py +++ b/pywb/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.51.0' +__version__ = '0.52.0' DEFAULT_CONFIG = 'pywb/default_config.yaml'
version: bump to <I> for upcoming incompatible changes/cleanup
py
diff --git a/salt/version.py b/salt/version.py index <HASH>..<HASH> 100644 --- a/salt/version.py +++ b/salt/version.py @@ -32,7 +32,16 @@ def __get_version_info_from_git(version, version_info): # Let's not import `salt.utils` for the above check kwargs['close_fds'] = True - process = subprocess.Popen(['git', 'describe', '--tags'], **kwargs) + try: + process = subprocess.Popen(['git', 'describe', '--tags'], **kwargs) + except WindowsError, err: + if err.errno != 2: + # Raise any other WindowsError exception so we know what's + # going on. + raise + # The system cannot find the file specified + return version, version_info + out, err = process.communicate() if not out.strip() or err.strip(): return version, version_info
Don't fail on Windows if git is not installed or not on `PATH`.
py
diff --git a/bot_utils/api.py b/bot_utils/api.py index <HASH>..<HASH> 100644 --- a/bot_utils/api.py +++ b/bot_utils/api.py @@ -20,7 +20,17 @@ class API(tweepy.API): _last_tweet, _last_reply, _last_retweet = None, None, None - def __init__(self, screen_name, **kwargs): + def __init__(self, screen_name, parsed_args=None, **kwargs): + # Optionally used args from argparse.ArgumentParser + if parsed_args: + try: + args = dict((k, v) for k, v in vars(parsed_args).items() if v is not None) + kwargs.update(**args) + except TypeError: + # probably didn't get a Namespace() for passed args + pass + + # Use passed config file, or look for it in the paths above if kwargs.get('config') and path.exists(kwargs['config']): file_name = kwargs['config']
pass args or kwargs into API
py
diff --git a/src/debianbts.py b/src/debianbts.py index <HASH>..<HASH> 100644 --- a/src/debianbts.py +++ b/src/debianbts.py @@ -194,15 +194,16 @@ def get_status(*nrs): return [_parse_status(elem) for elem in reply[0]] else: return [_parse_status(reply[0])] + L = [] # Process the input in batches to avoid hitting resource limits on the BTS for nr in nrs: if isinstance(nr, list): - for i in range(0, len(nr), BATCH_SIZE): - reply = server.get_status(nr[i:i+BATCH_SIZE]) - bugs.extend(parse(reply)) + L.extend(nr) else: - reply = server.get_status(nr) - bugs.extend(parse(reply)) + L.append(nr) + for i in range(0, len(L), BATCH_SIZE): + reply = server.get_status(L[i:i+BATCH_SIZE]) + bugs.extend(parse(reply)) return bugs
get_status: Flatten input before sending requests aca7ac<I>a<I>dc5a0e<I>e<I>eb3d2d<I>ad<I> introduced a performance regression (as reported in Debian bug #<I>) for typical inputs, since every bug's status would be requested individually. Flattening the input to a single list before performing the batch requests ensures we're not performing unnecessary requests.
py
diff --git a/host/pybar/fei4_run_base.py b/host/pybar/fei4_run_base.py index <HASH>..<HASH> 100644 --- a/host/pybar/fei4_run_base.py +++ b/host/pybar/fei4_run_base.py @@ -172,9 +172,10 @@ class Fei4RunBase(RunBase): self.save_configuration_dict(self.raw_data_file.h5_file, 'run_conf', self.run_conf) if not get_configured(self): # reset_service_records should only called once after power up self.register_utils.reset_service_records() - set_configured(self) + self.register_utils.global_reset() self.register_utils.configure_all() + set_configured(self) self.register_utils.reset_bunch_counter() self.register_utils.reset_event_counter()
BUG: now config fe status flag is kept after recongiguration
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ For more details, please go to the `home page`_ or to the `wiki`_. .. _`home page`: https://github.com/retext-project/retext .. _`wiki`: https://github.com/retext-project/retext/wiki''' +import os import sys from os.path import join, isfile, basename from distutils import log @@ -55,9 +56,10 @@ class retext_build_translations(Command): pass def run(self): + environment = dict(os.environ, QT_SELECT='5') for ts_file in glob(join('locale', '*.ts')): try: - check_call(('lrelease', ts_file), env={'QT_SELECT': '5'}) + check_call(('lrelease', ts_file), env=environment) except Exception as e: log.warn('Failed to build translations: %s', e) break
setup.py: Preserve system environment when calling lrelease Fixes #<I>.
py
diff --git a/angr/simos.py b/angr/simos.py index <HASH>..<HASH> 100644 --- a/angr/simos.py +++ b/angr/simos.py @@ -232,8 +232,9 @@ class SimOS(object): state.memory.mem._preapproved_stack = IRange(stack_end - stack_size, stack_end) if o.INITIALIZE_ZERO_REGISTERS in state.options: - for r in self.arch.registers: - setattr(state.regs, r, 0) + highest_reg_offset, reg_size = max(state.arch.registers.values()) + for i in range(0, highest_reg_offset + reg_size, state.arch.bytes): + state.registers.store(i, state.se.BVV(0, state.arch.bits)) state.regs.sp = stack_end
change the way zero-registers are initialized
py
diff --git a/filer/admin/fileadmin.py b/filer/admin/fileadmin.py index <HASH>..<HASH> 100644 --- a/filer/admin/fileadmin.py +++ b/filer/admin/fileadmin.py @@ -114,7 +114,8 @@ class FileAdmin(PrimitivePermissionAwareModelAdmin): url = r.get("Location", None) # Account for custom Image model - image_change_list_url_name = 'admin:filer_{0}_changelist'.format(Image._meta.model_name) + image_change_list_url_name = 'admin:{0}_{1}_changelist'.format(Image._meta.app_label, + Image._meta.model_name) # Check against filer_file_changelist as file deletion is always made by # the base class if (url in ["../../../../", "../../"] or
You can set an app_label on your custom image model. Account for this in image admin changelist url.
py
diff --git a/tests/test_django_integration.py b/tests/test_django_integration.py index <HASH>..<HASH> 100644 --- a/tests/test_django_integration.py +++ b/tests/test_django_integration.py @@ -15,6 +15,28 @@ def test_django_works(redis_server): @pytest.mark.skipif("not django") +def test_django_add_or_set_locked(redis_server): + def creator_42(): + return 42 + + def none_creator(): + return None + + def assert_false_creator(): + assert False + + assert cache.get_or_set_locked("foobar-aosl", creator_42) == 42 + assert cache.get_or_set_locked("foobar-aosl", assert_false_creator) == 42 + + try: + val = cache.get_or_set_locked("foobar-aosl2", none_creator) + except ValueError: + pass + else: + assert False + + +@pytest.mark.skipif("not django") def test_reset_all(redis_server): lock1 = cache.lock("foobar1") lock2 = cache.lock("foobar2")
Added test for get_or_set_locked
py
diff --git a/doc/source/conf.py b/doc/source/conf.py index <HASH>..<HASH> 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -68,7 +68,7 @@ html_static_path = ['_static'] intersphinx_mapping = { 'python': ('http://docs.python.org/3', None), - 'numpy':('http://docs.scipy.org/doc/numpy', None), + 'numpy': ('http://docs.scipy.org/doc/numpy', None), 'scipy': ('http://docs.scipy.org/doc/scipy/reference', None), 'h5py': ('http://docs.h5py.org/en/latest/', None)}
Fixed typesetting in doc/source/conf.py.
py
diff --git a/juicer/utils/__init__.py b/juicer/utils/__init__.py index <HASH>..<HASH> 100644 --- a/juicer/utils/__init__.py +++ b/juicer/utils/__init__.py @@ -424,7 +424,9 @@ def is_rpm(path): import magic m = magic.open(magic.MAGIC_MIME) m.load() - if 'rpm' in m.file(path): + mime = m.file(path) + # rpms or directories are cool + if 'rpm' in mime or 'directory' in mime: return True else: juicer.utils.Log.log_info("error: File `%s` is not an rpm" % path)
Allow directories through the gauntlet. Closes #<I>.
py
diff --git a/salt/modules/inspectlib/collector.py b/salt/modules/inspectlib/collector.py index <HASH>..<HASH> 100644 --- a/salt/modules/inspectlib/collector.py +++ b/salt/modules/inspectlib/collector.py @@ -183,7 +183,7 @@ class Inspector(object): continue except Exception as ex: continue - if not valid: + if not valid or not os.path.exists(obj): continue mode = os.lstat(obj).st_mode if stat.S_ISLNK(mode):
Bugfix: path may not really exist
py
diff --git a/graphos/tests.py b/graphos/tests.py index <HASH>..<HASH> 100755 --- a/graphos/tests.py +++ b/graphos/tests.py @@ -434,6 +434,7 @@ class TestBaseHighcharts(TestCase): self.assertEqual(chart.get_navigation(), {}) + class TestHighchartsLineChart(TestBaseHighcharts): chart_klass = highcharts.LineChart def test_line_chart(self): @@ -671,6 +672,10 @@ class TestHighchartsHeatMap(TestBaseHighcharts): def test_get_series_with_colors(self): pass + def test_get_color_axis(self): + chart = self.chart_klass(data_source=self.data_source) + self.assertEqual(chart.get_color_axis(), {}) + class TestHighchartsTreeMap(TestBaseHighcharts): chart_klass = highcharts.TreeMap treemap_data = [["Country", "Cause", "Death Rate"],
added test case of coloraxis for heatmap
py
diff --git a/pynos/versions/base/interface.py b/pynos/versions/base/interface.py index <HASH>..<HASH> 100644 --- a/pynos/versions/base/interface.py +++ b/pynos/versions/base/interface.py @@ -1210,7 +1210,6 @@ class Interface(object): callback = kwargs.pop('callback', self._callback) int_types = [ - 'gigabitethernet', 'tengigabitethernet', 'fortygigabitethernet', 'hundredgigabitethernet' @@ -1279,7 +1278,6 @@ class Interface(object): callback = kwargs.pop('callback', self._callback) int_types = [ - 'gigabitethernet', 'tengigabitethernet', 'fortygigabitethernet', 'hundredgigabitethernet'
[PYNOS-<I>] Remove 1g support from fabric_isl and fabric_trunk Change-Id: I<I>d<I>bbf<I>d<I>cba9f7aef
py
diff --git a/tests/test_pid.py b/tests/test_pid.py index <HASH>..<HASH> 100644 --- a/tests/test_pid.py +++ b/tests/test_pid.py @@ -108,6 +108,15 @@ def test_pid_force_register_term_signal_handler(): with pid.PidFile(register_term_signal_handler=True): assert signal.getsignal(signal.SIGTERM) is not _custom_signal_func +def test_pid_supply_term_signal_handler(): + def _noop(*args, **kwargs): + pass + + signal.signal(signal.SIGTERM, signal.SIG_IGN) + + with pid.PidFile(register_term_signal_handler=_noop): + assert signal.getsignal(signal.SIGTERM) is _noop + def test_pid_chmod(): with pid.PidFile(chmod=0o600):
add test for supplying custom signal handler
py
diff --git a/wagtailgeowidget/widgets.py b/wagtailgeowidget/widgets.py index <HASH>..<HASH> 100644 --- a/wagtailgeowidget/widgets.py +++ b/wagtailgeowidget/widgets.py @@ -28,6 +28,7 @@ class GeoField(HiddenInput): self.address_field = kwargs.pop('address_field', self.address_field) self.srid = kwargs.pop('srid', self.srid) self.id_prefix = kwargs.pop('id_prefix', self.id_prefix) + self.zoom = kwargs.pop('zoom', GEO_WIDGET_ZOOM) super(GeoField, self).__init__(*args, **kwargs) @@ -72,7 +73,7 @@ class GeoField(HiddenInput): 'defaultLocation': GEO_WIDGET_DEFAULT_LOCATION, 'addressSelector': address_selector, 'latLngDisplaySelector': '#_id_{}_latlng'.format(name), - 'zoom': GEO_WIDGET_ZOOM, + 'zoom': self.zoom, 'srid': self.srid, }
Make it possible to override zoom in widget
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ LONG_DESCRIPTION = package.__doc__ builtins._ASTROPY_PACKAGE_NAME_ = PACKAGENAME # VERSION should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386) -VERSION = '0.0.dev' +VERSION = '0.1' # Indicates if this version is a release version RELEASE = 'dev' not in VERSION
Preparing release <I>
py
diff --git a/fluidsynth.py b/fluidsynth.py index <HASH>..<HASH> 100644 --- a/fluidsynth.py +++ b/fluidsynth.py @@ -494,7 +494,7 @@ class Synth: return False if vel < 0 or vel > 128: return False - return fluid_synth_noteon(self.synth, chan, key, vel) + return fluid_synth_noteon(self.synth, chan, key, vel) def noteoff(self, chan, key): """Stop a note""" if key < 0 or key > 128:
Fix wrong indent in noteon function
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ if 'READTHEDOCS' in os.environ: install_requires = [ 'python-dateutil<=2.8.99999', 'pycryptodome<=3.8.99999', - 'requests<=2.21.99999', + 'requests<=2.22.99999', 'readerwriterlock<=1.0.99999', ] @@ -24,7 +24,7 @@ sqlalchemy_requires = [ ] cassandra_requires = [ - 'cassandra-driver<=3.17.99999' + 'cassandra-driver<=3.18.99999' ] django_requires = [ @@ -33,7 +33,7 @@ django_requires = [ testing_requires = cassandra_requires + sqlalchemy_requires + django_requires + [ 'mock<=3.0.99999', - 'flask<=1.0.99999', + 'flask<=1.1.99999', 'flask_sqlalchemy<=2.4.99', 'uwsgi<=2.0.99999', 'redis<=3.2.99999',
Upgraded versions of dependencies (esp. security fix in requests).
py
diff --git a/nose/test_potential.py b/nose/test_potential.py index <HASH>..<HASH> 100644 --- a/nose/test_potential.py +++ b/nose/test_potential.py @@ -180,6 +180,9 @@ def test_forceAsDeriv_potential(): #Vertical force, if it exists if isinstance(tp,potential.planarPotential) \ or isinstance(tp,potential.linearPotential): continue + + if isinstance(tp,potential.KuzminDiskPotential) \ + or isinstance(tp,potential.KuzminDiskPotential): continue for ii in range(len(Rs)): for jj in range(len(Zs)): dz= 10.**-8.
Excluded KuzmanDiskPotential from vertical derivative of potential test
py
diff --git a/tests.py b/tests.py index <HASH>..<HASH> 100644 --- a/tests.py +++ b/tests.py @@ -288,7 +288,7 @@ test_irregular_subplots() color_normalize_tests() quant_figure_tests() # ta_tests() -# bestfit() +bestfit() if __name__ == '__main__':
re-enable bestfit test
py
diff --git a/gofedlib/go/apiextractor/extractor.py b/gofedlib/go/apiextractor/extractor.py index <HASH>..<HASH> 100644 --- a/gofedlib/go/apiextractor/extractor.py +++ b/gofedlib/go/apiextractor/extractor.py @@ -28,6 +28,7 @@ class ApiExtractor(object): "--package-path {}".format(self._package_path), "--package-prefix {}:{}".format(self._package_path, self._hexsha), "--symbol-table-dir {}".format(self._generated), + "--library", ] if self._cgo != "": @@ -40,7 +41,7 @@ class ApiExtractor(object): else: raise ValueError("Dependency file {} not recognized".format(self._depsfile)) - self._so, se, rc = runCommand("goextract {}".format(" ".join(options))) + self._so, se, rc = runCommand("GOPATH={} goextract {}".format(self._gopath, " ".join(options))) if rc != 0: raise ExtractionException("goextract({}): {}".format(rc, se))
Set GOPATH before running goextract
py
diff --git a/dtool_irods/storagebroker.py b/dtool_irods/storagebroker.py index <HASH>..<HASH> 100644 --- a/dtool_irods/storagebroker.py +++ b/dtool_irods/storagebroker.py @@ -255,7 +255,8 @@ class IrodsStorageBroker(object): def _get_size_and_timestamp(self, irods_path): if self._use_cache: - return self._size_and_timestamp_cache[irods_path] + if irods_path in self._size_and_timestamp_cache: + return self._size_and_timestamp_cache[irods_path] cmd = CommandWrapper(["ils", "-l", irods_path]) cmd() @@ -267,6 +268,7 @@ class IrodsStorageBroker(object): time_str = info[4] dt = datetime.datetime.strptime(time_str, "%Y-%m-%d.%H:%M") utc_timestamp = int(time.mktime(dt.timetuple())) + return size_in_bytes, utc_timestamp @classmethod
Improve robustness of _get_size_and_timestamp with cache
py
diff --git a/tests/test_betfairstream.py b/tests/test_betfairstream.py index <HASH>..<HASH> 100644 --- a/tests/test_betfairstream.py +++ b/tests/test_betfairstream.py @@ -141,8 +141,9 @@ class BetfairStreamTest(unittest.TestCase): assert self.betfair_stream.datetime_last_received is not None assert self.betfair_stream.receive_count > 0 + @mock.patch('betfairlightweight.streaming.betfairstream.BetfairStream.stop') @mock.patch('betfairlightweight.streaming.betfairstream.BetfairStream._receive_all') - def test_read_loop_error(self, mock_receive_all): + def test_read_loop_error(self, mock_receive_all, mock_stop): mock_socket = mock.Mock() self.betfair_stream._socket = mock_socket self.betfair_stream._running = True
mock the stop method as the exception thrown due to trying to close the non-existent socket is masking the SocketError we're expecting
py
diff --git a/icekit/utils/readability/readability.py b/icekit/utils/readability/readability.py index <HASH>..<HASH> 100755 --- a/icekit/utils/readability/readability.py +++ b/icekit/utils/readability/readability.py @@ -2,11 +2,11 @@ import math -from readability_utils import get_char_count -from readability_utils import get_words -from readability_utils import get_sentences -from readability_utils import count_syllables -from readability_utils import count_complex_words +from .readability_utils import get_char_count +from .readability_utils import get_words +from .readability_utils import get_sentences +from .readability_utils import count_syllables +from .readability_utils import count_complex_words class Readability:
Let's try imports this way
py
diff --git a/src/REST/__init__.py b/src/REST/__init__.py index <HASH>..<HASH> 100644 --- a/src/REST/__init__.py +++ b/src/REST/__init__.py @@ -19,7 +19,8 @@ class REST(Keywords): content_type="application/json", user_agent="Robot Framework RESTinstance", proxies={}, - schema={}): + schema={}, + spec=None): if not url.startswith("http://") and not url.startswith("https://"): url = "http://" + url @@ -48,9 +49,10 @@ class REST(Keywords): "response": {} } self.schema.update(self.input(schema)) - self.spec = None + self.spec = self.input(spec) self.instances = [] + @staticmethod def print(json, header="\n", with_colors=True): json_data = dumps(json, ensure_ascii=False, indent=4)
Add `spec` to library settings
py
diff --git a/blimpy/file_wrapper.py b/blimpy/file_wrapper.py index <HASH>..<HASH> 100644 --- a/blimpy/file_wrapper.py +++ b/blimpy/file_wrapper.py @@ -50,13 +50,13 @@ class Reader(object): # This avoids resetting values if init is True: if t_start is None: - self.t_start = self.t_begin + t_start = self.t_begin if t_stop is None: - self.t_stop = self.t_end + t_stop = self.t_end if f_start is None: - self.f_start = self.f_begin + f_start = self.f_begin if f_stop is None: - self.f_stop = self.f_end + f_stop = self.f_end else: if f_start is None: f_start = self.f_start
Py3 freaks with None comparisons, making these more robust take 3 Former-commit-id: <I>d7ace<I>cb<I>ce1d6aa4bdadba9bc4ce<I>c<I>
py
diff --git a/ayrton/castt.py b/ayrton/castt.py index <HASH>..<HASH> 100644 --- a/ayrton/castt.py +++ b/ayrton/castt.py @@ -504,3 +504,5 @@ class CrazyASTTransformer (ast.NodeTransformer): node.body= [ p ] return node + + def visit_AsyncWith= visit_With
[+] even more support for new python-<I>'s async.
py
diff --git a/src/_pytest/nodes.py b/src/_pytest/nodes.py index <HASH>..<HASH> 100644 --- a/src/_pytest/nodes.py +++ b/src/_pytest/nodes.py @@ -29,6 +29,7 @@ from _pytest.mark.structures import Mark from _pytest.mark.structures import MarkDecorator from _pytest.mark.structures import NodeKeywords from _pytest.outcomes import fail +from _pytest.pathlib import Path from _pytest.store import Store if TYPE_CHECKING: @@ -361,8 +362,14 @@ class Node(metaclass=NodeMeta): else: truncate_locals = True + # excinfo.getrepr() formats paths relative to the CWD if `abspath` is False. + # It is possible for a fixture/test to change the CWD while this code runs, which + # would then result in the user seeing confusing paths in the failure message. + # To fix this, if the CWD changed, always display the full absolute path. + # It will be better to just always display paths relative to invocation_dir, but + # this requires a lot of plumbing (#6428). try: - abspath = os.getcwd() != str(self.config.invocation_dir) + abspath = Path(os.getcwd()) != Path(self.config.invocation_dir) except OSError: abspath = True
Use Path() instead of str for path comparison On Windows specifically is common to have drives diverging just by casing ("C:" vs "c:"), depending on the cwd provided by the user.
py
diff --git a/pyee/__init__.py b/pyee/__init__.py index <HASH>..<HASH> 100644 --- a/pyee/__init__.py +++ b/pyee/__init__.py @@ -17,11 +17,14 @@ class Event_emitter(object): self._events[event] = [] #fire 'new_listener' *before* adding the new listener! - self.emit('new_listener') + self.emit('new_listener', event, f) # Add the necessary function self._events[event].append(f) + # Return original function so removal works + return f + if (f==None): return _on else:
Removal of listeners now works when defining through decorator, also made emission of new_listener take in event and function
py
diff --git a/salt/states/user.py b/salt/states/user.py index <HASH>..<HASH> 100644 --- a/salt/states/user.py +++ b/salt/states/user.py @@ -232,7 +232,7 @@ def present(name, specified, Default is ``True``. empty_password - Set to True to enable no password-less login for user, Default is ``False``. + Set to True to enable password-less login for user, Default is ``False``. shell The login shell, defaults to the system default shell
Making the language more clear. Fixes #<I>
py
diff --git a/nat/restClient.py b/nat/restClient.py index <HASH>..<HASH> 100644 --- a/nat/restClient.py +++ b/nat/restClient.py @@ -8,6 +8,8 @@ Created on Sun Jun 5 13:08:43 2016 import requests import json import os +import webbrowser +from bs4 import BeautifulSoup as bs import io from zipfile import ZipFile @@ -43,7 +45,19 @@ class RESTClient: zipDoc = ZipFile(io.BytesIO(response.content)) zipDoc.extractall(pathDB) else: - raise AttributeError("REST server returned an error number " + str(response.status_code)) + path = os.path.abspath("error_log.html") + url = 'file://' + path + soup=bs(response.content) #make BeautifulSoup + prettyHTML=soup.prettify() #prettify the html + with open(path, 'w') as f: + f.write(prettyHTML) + webbrowser.open(url) + + raise AttributeError("REST server returned an error number " + + str(response.status_code) + + "\Response content: " + str(response.content) + + "\nRequest sent to the URL: " + self.serverURL + "import_pdf" + + "\nContent of it 'files' argument: " + str(files))
Impoving the reporting of errors in restClient.py.
py
diff --git a/ailment/analyses/propagator.py b/ailment/analyses/propagator.py index <HASH>..<HASH> 100644 --- a/ailment/analyses/propagator.py +++ b/ailment/analyses/propagator.py @@ -186,9 +186,10 @@ def get_engine(base_engine): false_target is stmt.false_target: pass else: + new_jump_stmt = Stmt.ConditionalJump(stmt.idx, cond, true_target, false_target, **stmt.tags) self.state.add_final_replacement(self._codeloc(), stmt, - Stmt.ConditionalJump(stmt.idx, cond, true_target, false_target) + new_jump_stmt, ) #
Propagator: Do not lose extra attributes when copying ConditionalJumps.
py
diff --git a/peyotl/collections/collections_umbrella.py b/peyotl/collections/collections_umbrella.py index <HASH>..<HASH> 100644 --- a/peyotl/collections/collections_umbrella.py +++ b/peyotl/collections/collections_umbrella.py @@ -152,6 +152,8 @@ class _TreeCollectionStore(TypeAwareDocStore): collection_id = self._increment_id(collection_id) self._doc2shard_map[collection_id] = None # pass the id and collection JSON to a proper git action + new_collection_id = None + r = None try: gd, new_collection_id = self.create_git_action_for_new_collection(new_collection_id=new_collection_id) try:
Initialize var in case of failure
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- import subprocess - +import os from setuptools import setup, find_packages from setuptools.command.develop import develop from setuptools.command.install import install @@ -32,8 +32,12 @@ with open('HISTORY.rst') as history_file: # comment if preparing PyPI package version = '1.7' -sha = subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('ascii').strip() -version_git = version + '+' + sha[:7] + +if os.path.exists('.git'): + sha = subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('ascii').strip() + version_git = version + '+' + sha[:7] +else: + version_git = version with open('tensorboardX/__init__.py', 'a') as f: f.write('\n__version__ = "{}"\n'.format(version_git))
fix #<I> (#<I>)
py
diff --git a/backoff.py b/backoff.py index <HASH>..<HASH> 100644 --- a/backoff.py +++ b/backoff.py @@ -103,7 +103,7 @@ import sys # Use module-specific logger with a default null handler. logger = logging.getLogger(__name__) -if sys.version_info < (2, 7, 0): +if sys.version_info < (2, 7, 0): # pragma: no cover class NullHandler(logging.Handler): def emit(self, record): pass
Fix <I>% code coverage
py
diff --git a/plenum/cli/cli.py b/plenum/cli/cli.py index <HASH>..<HASH> 100644 --- a/plenum/cli/cli.py +++ b/plenum/cli/cli.py @@ -544,12 +544,8 @@ class Cli: @activeWallet.setter def activeWallet(self, wallet): self._activeWallet = wallet - self.postActiveWalletChange() self.print('Active keyring set to "{}"'.format(wallet.name)) - def postActiveWalletChange(self): - pass - @property def activeClient(self): self._buildClientIfNotExists()
refactored wallet setter logic
py
diff --git a/raven/contrib/tornado/__init__.py b/raven/contrib/tornado/__init__.py index <HASH>..<HASH> 100644 --- a/raven/contrib/tornado/__init__.py +++ b/raven/contrib/tornado/__init__.py @@ -127,7 +127,7 @@ class AsyncSentryClient(Client): headers = {} return AsyncHTTPClient().fetch( - url, callback, method="POST", body=data, **headers + url, callback, method="POST", body=data, headers=headers )
Fix: Headers must not be passed as keyword arguments, but as headers
py
diff --git a/account/tests/test_views.py b/account/tests/test_views.py index <HASH>..<HASH> 100644 --- a/account/tests/test_views.py +++ b/account/tests/test_views.py @@ -2,7 +2,7 @@ from django.core.urlresolvers import reverse from django.test.client import RequestFactory from django.utils import unittest -from django.contrib.auth.models import AnonymousUser +from django.contrib.auth.models import AnonymousUser, User from account.views import SignupView, LoginView @@ -50,6 +50,16 @@ class SignupViewTestCase(unittest.TestCase): self.assertEqual(response.status_code, 200) self.assertEqual(response.template_name, 'account/signup_closed.html') + def test_post_successful(self): + post = {"username": "user", "password": "pwd", + "password_confirm": "pwd", "email": "info@example.com"} + request = self.factory.post(reverse("account_signup"), post) + request.user = AnonymousUser() + response = SignupEnabledView.as_view()(request) + self.assertEqual(response.status_code, 302) + user = User.objects.get(username="user") + self.asserEqual(user.email, "info@example.com") + class LoginViewTestCase(unittest.TestCase):
added test for SignupView successful post
py
diff --git a/remoto/process.py b/remoto/process.py index <HASH>..<HASH> 100644 --- a/remoto/process.py +++ b/remoto/process.py @@ -94,7 +94,7 @@ def extend_env(conn, arguments): if arguments.get('extend_env'): for key, value in arguments['extend_env'].items(): arguments['env'][key] = value - arguments.pop('extend_env') + arguments.pop('extend_env') return arguments
process: extend_env is not there always, remove it when present
py
diff --git a/dvc/command/repro.py b/dvc/command/repro.py index <HASH>..<HASH> 100644 --- a/dvc/command/repro.py +++ b/dvc/command/repro.py @@ -4,7 +4,6 @@ import copy from dvc.command.run import CmdRun, CommandFile from dvc.logger import Logger from dvc.exceptions import DvcException -from dvc.path.data_item import DataDirError from dvc.state_file import StateFile from dvc.system import System from dvc.data_cloud import file_md5 @@ -119,7 +118,7 @@ class ReproChange(object): os.remove(data_item.data.relative) except Exception as ex: msg = 'Data item {} cannot be removed before reproduction: {}' - Logger.error(msg.format(output_dvc, ex)) + Logger.debug(msg.format(output_dvc, ex)) def reproduce_run(self): Logger.info('Reproducing run command for data item {}. Args: {}'.format(
It is okay if output file does not exist
py
diff --git a/eventsourcing/tests/test_flask.py b/eventsourcing/tests/test_flask.py index <HASH>..<HASH> 100644 --- a/eventsourcing/tests/test_flask.py +++ b/eventsourcing/tests/test_flask.py @@ -104,10 +104,15 @@ class TestFlaskWsgi(TestFlaskApp): # Run uwsgi. if path_to_virtualenv: path_to_uwsgi = join(path_to_virtualenv, "bin", "uwsgi") - assert os.path.exists(path_to_uwsgi), path_to_uwsgi + if not os.path.exists(path_to_uwsgi): + raise AssertionError( + "Can't find uwsgi in virtualenv: %s" % path_to_uwsgi + ) else: # In a container, without a virtualenv? path_to_uwsgi = "/usr/local/bin/uwsgi" + assert os.path.exists(path_to_uwsgi), path_to_uwsgi + raise AssertionError("Can't find uwsgi: %s" % path_to_uwsgi) # Todo: Maybe use shutil.which, after dropping support for Python 2.7. cmd = [path_to_uwsgi]
Trying to get uwsgi working again on Travis.
py
diff --git a/resolwe/storage/tests/test_manager.py b/resolwe/storage/tests/test_manager.py index <HASH>..<HASH> 100644 --- a/resolwe/storage/tests/test_manager.py +++ b/resolwe/storage/tests/test_manager.py @@ -261,7 +261,7 @@ class DecisionMakerOverrideRuleTest(TestCase): def test_override_process_type(self): decision_maker = DecisionMaker(self.file_storage1) settings = copy.deepcopy(CONNECTORS_SETTINGS) - override = {"data:test:": {"delay": 10}} + override = {"data:test": {"delay": 10}} override_nonexisting = {"data:nonexisting": {"delay": 10}} FileStorage.objects.filter(pk=self.file_storage1.pk).update( created=timezone.now() - timedelta(days=6)
Add test for missing colon Change previous test to expose bug when colon was missing at the end of process_type in the connector settings.
py
diff --git a/salt/modules/vsphere.py b/salt/modules/vsphere.py index <HASH>..<HASH> 100644 --- a/salt/modules/vsphere.py +++ b/salt/modules/vsphere.py @@ -210,7 +210,7 @@ def _get_proxy_connection_details(): Returns the connection details of the following proxies: esxi ''' proxytype = get_proxy_type() - elif proxytype == 'esxi': + if proxytype == 'esxi': details = __salt__['esxi.get_details']() else: raise CommandExecutionError('\'{0}\' proxy is not supported'
Fixed small bug in _get_proxy_connection_details
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( packages=[ 'querybuilder' ], - url="https://github.com/wesokes/django-query-builder", + url="https://github.com/ambitioninc/django-query-builder", description="Django query builder", install_requires=[ "django>=1.4",
Update setup.py Changed the url
py
diff --git a/gwpy/timeseries/core.py b/gwpy/timeseries/core.py index <HASH>..<HASH> 100644 --- a/gwpy/timeseries/core.py +++ b/gwpy/timeseries/core.py @@ -145,20 +145,10 @@ class TimeSeries(Series): self.dx = (1 / units.Quantity(val, units.Hertz)).to(self.xunit) @property - def channel(self): - """Data channel associated with this `TimeSeries`. - """ - return self.metadata['channel'] - - @channel.setter - def channel(self, ch): - self.metadata['channel'] = Channel(ch) - - @property def span(self): """Time Segment encompassed by thie `TimeSeries`. """ - return Segment(*map(float, super(TimeSeries, self).span)) + return Segment(*map(numpy.float64, super(TimeSeries, self).span)) @property def duration(self):
TimeSeries: fixed type set in span property
py
diff --git a/lint.py b/lint.py index <HASH>..<HASH> 100644 --- a/lint.py +++ b/lint.py @@ -846,6 +846,20 @@ class PyLinter(OptionsManagerMixIn, MessagesHandlerMixIn, ReportsHandlerMixIn, def check_astroid_module(self, astroid, walker, rawcheckers, tokencheckers): """check a module from its astroid representation, real work""" + try: + return self._check_astroid_module(astroid, walker, + rawcheckers, tokencheckers) + finally: + # Close file_stream, if opened, to avoid to open many files. + if astroid.file_stream: + astroid.file_stream.close() + # TODO(cpopa): This is an implementation detail, but it will + # be moved in astroid at some point. + # We invalidate the cached property, to let the others + # modules which relies on this one to get a new file stream. + del astroid.file_stream + + def _check_astroid_module(self, astroid, walker, rawcheckers, tokencheckers): # call raw checkers if possible try: tokens = tokenize_module(astroid)
Close the file_stream of the ast node after analysing it. This ensures that we don't leak open fds and that we are well-behavioured for PyPy (previously, the file were closed due to gc).
py
diff --git a/twisted_exiftool/__init__.py b/twisted_exiftool/__init__.py index <HASH>..<HASH> 100644 --- a/twisted_exiftool/__init__.py +++ b/twisted_exiftool/__init__.py @@ -111,7 +111,8 @@ class ExiftoolProtocol(protocol.Protocol): self._stopped = d self.transport.write(b'\n'.join((b'-stay_open', b'False', b''))) else: - d = defer.fail(RuntimeError("not connected")) + # Already disconnected. + d = defer.success(self) return d
Do not fail when attempting to loseConnection on protocol which is not connected
py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( license='MIT', packages=find_packages(exclude=('tests',)), keywords='neo4j django plugin neomodel', - install_requires=['neomodel>=4.0.2', 'pytz>=2020.1', 'django>=2.2'], + install_requires=['neomodel>=4.0.3', 'pytz>=2020.1', 'django>=2.2'], tests_require=['pytest-django>=3.10.0'], classifiers=[ "Development Status :: 4 - Beta",
bump neomodel to <I> (#<I>)
py
diff --git a/host/pybar/fei4/register.py b/host/pybar/fei4/register.py index <HASH>..<HASH> 100644 --- a/host/pybar/fei4/register.py +++ b/host/pybar/fei4/register.py @@ -12,6 +12,7 @@ import copy import struct import tables as tb import datetime +from contextlib import contextmanager from pybar.analysis.RawDataConverter.data_struct import NameValue from pybar.utils.utils import string_is_binary, flatten_iterable, iterable, str2bool @@ -1252,6 +1253,14 @@ class FEI4Register(object): # print bv.length() return bv1 + bv0 + @contextmanager + def restored(self, name=None): + self.create_restore_point(name) + try: + yield + finally: + self.restore() + def create_restore_point(self, name=None): '''Creating a configuration restore point.
ENH: adding with statement for creating / restoring configuration
py
diff --git a/webdriver_manager/driver_cache.py b/webdriver_manager/driver_cache.py index <HASH>..<HASH> 100644 --- a/webdriver_manager/driver_cache.py +++ b/webdriver_manager/driver_cache.py @@ -1,6 +1,7 @@ import datetime import json import os +import sys from webdriver_manager.logger import log from webdriver_manager.utils import get_date_diff, File, save_file @@ -10,7 +11,10 @@ class DriverCache(object): def __init__(self, root_dir=None): self._root_dir = root_dir - if root_dir is None: + + if self._root_dir is None and os.environ.get("WDM_LOCAL", '0') == '1': + self._root_dir = os.path.join(sys.path[0], ".wdm") + if self._root_dir is None: self._root_dir = os.path.join(os.path.expanduser("~"), ".wdm") self._drivers_root = "drivers" self._drivers_json_path = os.path.join(self._root_dir, "drivers.json")
add support for .wdm local (#<I>)
py
diff --git a/hcam_widgets/hcam.py b/hcam_widgets/hcam.py index <HASH>..<HASH> 100644 --- a/hcam_widgets/hcam.py +++ b/hcam_widgets/hcam.py @@ -685,6 +685,15 @@ class InstPars(tk.LabelFrame): self.expose.config(bg=g.COL['warn']) status = False + # don't allow binning other than 1, 2 in overscan or prescan mode + if self.oscan() or self.oscany(): + if xbin not in (1, 2): + status = False + xbinw.config(bg=g.COL['error']) + if ybin not in (1, 2): + status = False + ybinw.config(bg=g.COL['error']) + # allow posting if parameters are OK. update count and SN estimates too if status: if (g.cpars['hcam_server_on'] and g.cpars['eso_server_online'] and
don't allow heavy binning with pre or overscan enabled
py
diff --git a/openquake/job/validation.py b/openquake/job/validation.py index <HASH>..<HASH> 100644 --- a/openquake/job/validation.py +++ b/openquake/job/validation.py @@ -100,8 +100,8 @@ def random_seed_is_valid(mdl): def number_of_logic_tree_samples_is_valid(mdl): - if not mdl.number_of_logic_tree_samples > 0: - return False, ['Number of logic tree samples must be > 0'] + if not mdl.number_of_logic_tree_samples >= 0: + return False, ['Number of logic tree samples must be >= 0'] return True, []
job/validation: allow for zero number of logic tree samples
py
diff --git a/f5/common/iapp_parser.py b/f5/common/iapp_parser.py index <HASH>..<HASH> 100644 --- a/f5/common/iapp_parser.py +++ b/f5/common/iapp_parser.py @@ -60,7 +60,7 @@ class IappParser(object): if brace_count is not 0: raise CurlyBraceMismatchException( - 'Curly braces mismatch in section {}.'.format(section) + 'Curly braces mismatch in section %s.' % section ) def get_section_start(self, section): @@ -78,7 +78,7 @@ class IappParser(object): return found.end() - 1 raise NonextantSectionException( - 'Section {} not found in template'.format(section) + 'Section %s not found in template' % section ) def get_template_name(self):
Fixing python <I> errors Issues: Issue #<I> Problem: Build uncovered errors when running iapp_parser unit test in python <I> Analysis: Change string.format to use variable replacement with percentage sign. Tests: All tests passing
py
diff --git a/tests.py b/tests.py index <HASH>..<HASH> 100644 --- a/tests.py +++ b/tests.py @@ -1,6 +1,7 @@ import datetime import six -from reporters_db import REPORTERS, VARIATIONS_ONLY, EDITIONS +from reporters_db import REPORTERS, VARIATIONS_ONLY, EDITIONS, \ + NAMES_TO_EDITIONS from unittest import TestCase VALID_CITE_TYPES = ( @@ -40,6 +41,13 @@ class ConstantsTest(TestCase): variation ) + def test_basic_names_to_editions(self): + """Do we get something like we expected in the NAME_TO_EDITION var?""" + self.assertEqual( + NAMES_TO_EDITIONS['Atlantic Reporter'], + ['A.', 'A.2d', 'A.3d'], + ) + def test_that_all_dates_are_converted_to_dates_not_strings(self): """Do we properly make the ISO-8601 date strings into Python dates?""" for reporter_name, reporter_list in six.iteritems(REPORTERS):
feat(variable tests): New variable mapping reporter names to editions
py
diff --git a/tests/unit/auth_test.py b/tests/unit/auth_test.py index <HASH>..<HASH> 100644 --- a/tests/unit/auth_test.py +++ b/tests/unit/auth_test.py @@ -79,6 +79,7 @@ class MasterACLTestCase(integration.ModuleCase): opts['client_acl_blacklist'] = {} opts['master_job_cache'] = '' opts['sign_pub_messages'] = False + opts['con_cache'] = '' opts['external_auth'] = {'pam': {'test_user': [{'*': ['test.ping']}, {'minion_glob*': ['foo.bar']}, {'minion_func_test': ['func_test.*']}],
provide con_cache in the opts
py
diff --git a/dingo/core/network/stations.py b/dingo/core/network/stations.py index <HASH>..<HASH> 100644 --- a/dingo/core/network/stations.py +++ b/dingo/core/network/stations.py @@ -15,7 +15,6 @@ class MVStationDingo(StationDingo): def __init__(self, **kwargs): super().__init__(**kwargs) - @property def peak_generation(self, mode): """ Calculates cumulative peak generation of generators connected to
use function instead of property decorator since parameters are not allowed in property decorators
py
diff --git a/autograd/numpy/linalg.py b/autograd/numpy/linalg.py index <HASH>..<HASH> 100644 --- a/autograd/numpy/linalg.py +++ b/autograd/numpy/linalg.py @@ -161,7 +161,9 @@ def grad_eig(ans, x): f = 1/(e[..., anp.newaxis, :] - e[..., :, anp.newaxis] + 1.e-20) f -= _diag(f) ut = anp.swapaxes(u, -1, -2) - r = inv(ut)@(ge+f*(ut@gu) - f*(ut@anp.conj(u)@(anp.real(ut@gu)*anp.eye(n))))@ut + r1 = f * _dot(ut, gu) + r2 = -f * (_dot(_dot(ut, anp.conj(u)), anp.real(_dot(ut,gu)) * anp.eye(n))) + r = _dot(_dot(inv(ut), ge + r1 + r2), ut) if not anp.iscomplexobj(x): r = anp.real(r) # the derivative is still complex for real input (imaginary delta is allowed), real output
change @ to _dot
py
diff --git a/pwkit/ndshow_gtk3.py b/pwkit/ndshow_gtk3.py index <HASH>..<HASH> 100644 --- a/pwkit/ndshow_gtk3.py +++ b/pwkit/ndshow_gtk3.py @@ -629,7 +629,7 @@ class Cycler(Viewer): self.cadence = cadence self.viewport = Viewport() - self.win = Gtk.Window(Gtk.WindowType.TOPLEVEL) + self.win = Gtk.Window(type=Gtk.WindowType.TOPLEVEL) self.win.set_title(title) self.win.set_default_size(default_width, default_height) self.win.connect('key-press-event', self._on_key_press) @@ -648,7 +648,7 @@ class Cycler(Viewer): hb.pack_start(self.plane_label, True, True, 2) self.desc_label = Gtk.Label() hb.pack_start(self.desc_label, True, True, 2) - self.cycle_tbutton = Gtk.ToggleButton('Cycle') + self.cycle_tbutton = Gtk.ToggleButton(label='Cycle') hb.pack_start(self.cycle_tbutton, False, True, 2) self.win.add(vb)
pwkit/ndshow_gtk3.py: fix a few more Gtk deprecation warnings
py
diff --git a/examples/server/tests/templatetags.py b/examples/server/tests/templatetags.py index <HASH>..<HASH> 100644 --- a/examples/server/tests/templatetags.py +++ b/examples/server/tests/templatetags.py @@ -9,6 +9,8 @@ class TemplateTagsTest(TestCase): client = Client(enforce_csrf_checks=True) request = client.get('/dummy.html') request.META = {} + request.is_secure = lambda: False + request.get_host = lambda: 'localhost' template = Template('{% load djangular_tags %}x="{% csrf_token %}"') context = RequestContext(request, {'csrf_token': '123'}) response = template.render(context)
added dummy functions is_secure and get_host to emulate response object
py
diff --git a/chessboard/tests/test_solver.py b/chessboard/tests/test_solver.py index <HASH>..<HASH> 100644 --- a/chessboard/tests/test_solver.py +++ b/chessboard/tests/test_solver.py @@ -490,6 +490,7 @@ class TestSolverContext(unittest.TestCase): ]) self.assertEquals(solver.result_counter, 8) + @unittest.skip("Solver too slow") def test_eight_queens(self): solver = SolverContext(8, 8, queen=8) for _ in solver.solve():
Solver still too slow for Travis.
py
diff --git a/esptool.py b/esptool.py index <HASH>..<HASH> 100755 --- a/esptool.py +++ b/esptool.py @@ -205,7 +205,13 @@ class ESPROM: def read_mac(self): mac0 = esp.read_reg(esp.ESP_OTP_MAC0) mac1 = esp.read_reg(esp.ESP_OTP_MAC1) - return (0x18, 0xfe, 0x34, (mac1 >> 8) & 0xff, mac1 & 0xff, (mac0 >> 24) & 0xff) + if ((mac1 >> 16) & 0xff) == 0: + oui = (0x18, 0xfe, 0x34) + elif ((mac1 >> 16) & 0xff) == 1: + oui = (0xac, 0xd0, 0x74) + else: + raise Exception("Unknown OUI") + return oui + ((mac1 >> 8) & 0xff, mac1 & 0xff, (mac0 >> 24) & 0xff) """ Read SPI flash manufacturer and device id """ def flash_id(self):
improved mac address algorithm from Espressif's tool
py
diff --git a/taskw/test/test_datas.py b/taskw/test/test_datas.py index <HASH>..<HASH> 100644 --- a/taskw/test/test_datas.py +++ b/taskw/test/test_datas.py @@ -135,6 +135,7 @@ class _BaseTestDB(object): tasks = self.tw.load_tasks() eq_(len(tasks['pending']), 1) + eq_(tasks['pending'][0]['priority'], 'L') # For compatibility with the direct and shellout modes. # Shellout returns more information.
Check specifically for this to reduce confusion in test failure output.
py