Skip to content

Commit

Permalink
Fix dependency tests
Browse files Browse the repository at this point in the history
  • Loading branch information
waveform80 committed Mar 5, 2019
1 parent bc4a3f7 commit f250e07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/slave/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def test_package_metadata(mock_package):


def test_package_dependencies(mock_package, tmpdir):
builder.PiWheelsPackage.apt_cache = None
with mock.patch('tempfile.TemporaryDirectory') as tmpdir_mock, \
mock.patch('piwheels.slave.builder.Popen') as popen_mock, \
mock.patch('piwheels.slave.builder.Path.resolve', lambda self: self), \
Expand Down
2 changes: 2 additions & 0 deletions tests/slave/test_slave.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,11 @@ def test_connection_timeout_with_build(mock_systemd, slave_thread, mock_slave_dr

def test_slave_build_send_done(mock_systemd, slave_thread, mock_slave_driver, tmpdir, caplog):
with mock.patch('piwheels.slave.builder.Popen') as popen_mock, \
mock.patch('piwheels.slave.builder.PiWheelsPackage._calculate_apt_dependencies') as apt_mock, \
mock.patch('piwheels.slave.builder.PiWheelsPackage.transfer') as transfer_mock, \
mock.patch('piwheels.slave.builder.tempfile.TemporaryDirectory') as tmpdir_mock:
popen_mock().returncode = 0
apt_mock.return_value = set()
tmpdir_mock().name = str(tmpdir)
tmpdir.join('foo-0.1-cp34-cp34m-linux_armv7l.whl').ensure()
slave_thread.start()
Expand Down

0 comments on commit f250e07

Please sign in to comment.