Mercurial > hg
view tests/bundles/rename.sh @ 49642:7e6f3c69c0fb
tests: update test-util.py for modern attrs package
When updating to 22.1.0, this test started failing:
Traceback (most recent call last):
File "/tmp/mercurial-ci/tests/test-util.py", line 53, in <module>
_start_default = (util.timedcmstats.start.default, 'factory')
AttributeError: type object 'timedcmstats' has no attribute 'start'
Poking around in `hg debugshell`, the attribute is indeed missing, but looks to
be attached to `__attrs_attrs__` in both the currently vendored and the modern
version of attrs. The old attrs packages will print the same for both accesses,
so fingers crossed...
>>> print((util.timedcmstats.start.default, 'factory'))
(Factory(factory=<function timedcmstats.<lambda> at 0x000001EFDF0F21F0>, takes_self=False), 'factory')
>>> print((util.timedcmstats.__attrs_attrs__.start.default, 'factory'))
(Factory(factory=<function timedcmstats.<lambda> at 0x000001EFDF0F21F0>, takes_self=False), 'factory')
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 21 Nov 2022 16:18:28 -0500 |
parents | ebf6d38c9063 |
children |
line wrap: on
line source
#!/bin/sh # @ 3: 'move2' # | # o 2: 'move1' # | # | o 1: 'change' # |/ # o 0: 'add' hg init copies cd copies echo a > a echo b > b echo c > c hg ci -Am add echo a >> a echo b >> b echo c >> c hg ci -m change hg up -qC 0 hg cp a d hg mv b e hg mv c f hg ci -m move1 hg mv e g hg mv f c hg ci -m move2 hg bundle -a ../renames.hg cd ..