<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/buildstream.git/tests/testutils, branch bschubert/python38</title>
<subtitle>gitlab.com: buildstream/buildstream.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/'/>
<entry>
<title>Add tests for interactive `bst init`</title>
<updated>2019-12-05T13:46:40+00:00</updated>
<author>
<name>Chandan Singh</name>
<email>chandan@chandansingh.net</email>
</author>
<published>2019-11-12T00:47:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=23423f6bd1572003fbb1af571bf9a9758abdd79c'/>
<id>23423f6bd1572003fbb1af571bf9a9758abdd79c</id>
<content type='text'>
Add tests for interactive `bst init` command using
[pexpect](https://pexpect.readthedocs.io).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add tests for interactive `bst init` command using
[pexpect](https://pexpect.readthedocs.io).
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove newly unused API surfaces in CASCache</title>
<updated>2019-12-03T10:45:08+00:00</updated>
<author>
<name>Tristan Maat</name>
<email>tristan.maat@codethink.co.uk</email>
</author>
<published>2019-10-16T16:14:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=320b3f2efed977bc11903e5c981a17f7a709022c'/>
<id>320b3f2efed977bc11903e5c981a17f7a709022c</id>
<content type='text'>
This also involves a number of changes to tests and other parts of the
codebase since they were hacking about wit API that shouldn't have
existed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This also involves a number of changes to tests and other parts of the
codebase since they were hacking about wit API that shouldn't have
existed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update all python dependencies</title>
<updated>2019-12-02T11:51:15+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>bschubert15@bloomberg.net</email>
</author>
<published>2019-12-02T11:35:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=ff6f6d0c38218d954814847f2a25b6d056347691'/>
<id>ff6f6d0c38218d954814847f2a25b6d056347691</id>
<content type='text'>
This updates all dependencies on the project, which is mainly needed
by python3.8 but can be done independentely.

This also disables multiple false positive lint errors and disable a
new check that we don't need.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This updates all dependencies on the project, which is mainly needed
by python3.8 but can be done independentely.

This also disables multiple false positive lint errors and disable a
new check that we don't need.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Use pytest.raise() instead of checking for return code</title>
<updated>2019-12-02T11:51:15+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>bschubert15@bloomberg.net</email>
</author>
<published>2019-12-02T11:34:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=e4ed02fbfcea355d6432e7a2e389af84a94120dd'/>
<id>e4ed02fbfcea355d6432e7a2e389af84a94120dd</id>
<content type='text'>
This gives a potentially more explicit understanding of what went
wrong, and pytest can give better information about that exception
than just us asserting the return code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This gives a potentially more explicit understanding of what went
wrong, and pytest can give better information about that exception
than just us asserting the return code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reformat code using Black</title>
<updated>2019-11-14T21:21:06+00:00</updated>
<author>
<name>Chandan Singh</name>
<email>csingh43@bloomberg.net</email>
</author>
<published>2019-11-11T17:07:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=122177153b14664a0e4fed85aa4f22b87cfabf56'/>
<id>122177153b14664a0e4fed85aa4f22b87cfabf56</id>
<content type='text'>
As discussed over the mailing list, reformat code using Black. This is a
one-off change to reformat all our codebase. Moving forward, we
shouldn't expect such blanket reformats. Rather, we expect each change
to already comply with the Black formatting style.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As discussed over the mailing list, reformat code using Black. This is a
one-off change to reformat all our codebase. Moving forward, we
shouldn't expect such blanket reformats. Rather, we expect each change
to already comply with the Black formatting style.
</pre>
</div>
</content>
</entry>
<entry>
<title>_remote: Ensure checks done in the subclasses are propagated</title>
<updated>2019-11-12T13:02:30+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>bschubert15@bloomberg.net</email>
</author>
<published>2019-11-12T10:24:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=7c470b46b33257bb81d70a00cb6b2114d68b9097'/>
<id>7c470b46b33257bb81d70a00cb6b2114d68b9097</id>
<content type='text'>
Currently, the `BaseRemote` would call `_check()` on the children, which
states that errors should be sent back as a string. However,
`BaseRemote` doesn't check the return of `_check()`.

This changes the contract so that subclasses throw `RemoteError`
themselves.

This also fixes the `ArtifactShare` and add a test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, the `BaseRemote` would call `_check()` on the children, which
states that errors should be sent back as a string. However,
`BaseRemote` doesn't check the return of `_check()`.

This changes the contract so that subclasses throw `RemoteError`
themselves.

This also fixes the `ArtifactShare` and add a test.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/artifactshare: safer cleanup_on_sigterm use</title>
<updated>2019-11-05T09:57:43+00:00</updated>
<author>
<name>Angelos Evripiotis</name>
<email>jevripiotis@bloomberg.net</email>
</author>
<published>2019-10-28T15:44:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=d938b0cd629870155a7de7bb56baae3c2306b6ab'/>
<id>d938b0cd629870155a7de7bb56baae3c2306b6ab</id>
<content type='text'>
Use the documented path [1] to `pytest_cov.embed.cleanup_on_sigterm()`,
to avoid crashing on some versions.

It turns out that pytest_cov v2.6.1 on my machine doesn't like the way
that we were accessing cleanup_on_sigterm(). Access it in such a way
that we will either get the function or an ImportError, as per the
documentation.

[1]: https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the documented path [1] to `pytest_cov.embed.cleanup_on_sigterm()`,
to avoid crashing on some versions.

It turns out that pytest_cov v2.6.1 on my machine doesn't like the way
that we were accessing cleanup_on_sigterm(). Access it in such a way
that we will either get the function or an ImportError, as per the
documentation.

[1]: https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html
</pre>
</div>
</content>
</entry>
<entry>
<title>testutils/artifactshare: don't hang on error</title>
<updated>2019-11-05T09:57:43+00:00</updated>
<author>
<name>Angelos Evripiotis</name>
<email>jevripiotis@bloomberg.net</email>
</author>
<published>2019-10-28T15:39:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=4ec1b734357a7e69beef2177ec072bd1aef629d0'/>
<id>4ec1b734357a7e69beef2177ec072bd1aef629d0</id>
<content type='text'>
Remove a couple of cases where it's possible to make the main test
process hang, waiting for something to appear on a queue.

Raise a friendlier exception, earlier, if there was a problem starting
the server process.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove a couple of cases where it's possible to make the main test
process hang, waiting for something to appear on a queue.

Raise a friendlier exception, earlier, if there was a problem starting
the server process.
</pre>
</div>
</content>
</entry>
<entry>
<title>testing, messenger: make dummy_context picklable</title>
<updated>2019-10-29T14:17:17+00:00</updated>
<author>
<name>Angelos Evripiotis</name>
<email>jevripiotis@bloomberg.net</email>
</author>
<published>2019-10-22T16:37:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=bd5e246ff05ac035195fa6358f4abd598683d7c8'/>
<id>bd5e246ff05ac035195fa6358f4abd598683d7c8</id>
<content type='text'>
Note that unittest.MagicMock is unfortunately not pickable, so if one
tries to cross over to a ChildJob then we're in trouble.

Sacrifice some convenience and a bit of safety by implementing our own
_DummyTask instead of using MagicMock.

Don't try to pickle the 'simple_task' context manager, if it's been
overridden when creating a test context.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note that unittest.MagicMock is unfortunately not pickable, so if one
tries to cross over to a ChildJob then we're in trouble.

Sacrifice some convenience and a bit of safety by implementing our own
_DummyTask instead of using MagicMock.

Don't try to pickle the 'simple_task' context manager, if it's been
overridden when creating a test context.
</pre>
</div>
</content>
</entry>
<entry>
<title>testutils/context.py: Mock tasks instead of accepting Nones</title>
<updated>2019-10-10T11:21:15+00:00</updated>
<author>
<name>Tristan Maat</name>
<email>tristan.maat@codethink.co.uk</email>
</author>
<published>2019-09-18T16:55:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=17144d84c2b63daf6e3aa9b42c6c773f134e8660'/>
<id>17144d84c2b63daf6e3aa9b42c6c773f134e8660</id>
<content type='text'>
To ensure that we only disable element loading task progress reporting
for very specific code paths, we need to teach the test suite to be a
bit smarter.

For this reason we now mock a _Task object and return it in our mock
context's relevant method invocations.

Other code paths that deliberately invoke the loader without task
reporting now mark their loads with NO_PROGRESS.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To ensure that we only disable element loading task progress reporting
for very specific code paths, we need to teach the test suite to be a
bit smarter.

For this reason we now mock a _Task object and return it in our mock
context's relevant method invocations.

Other code paths that deliberately invoke the loader without task
reporting now mark their loads with NO_PROGRESS.
</pre>
</div>
</content>
</entry>
</feed>
