def test_with_debug(self, fetch_allthethings_data): """The function should return a list with the specific debug buildername.""" fetch_allthethings_data.return_value = ALLTHETHINGS obtained = sorted(find_buildernames('try', 'mochitest-1', 'win32', 'debug')) expected = sorted([ u'Windows 7 VM 32-bit try debug test mochitest-1', u'Windows XP 32-bit try debug test mochitest-1', ]) assert obtained == expected
def test_with_debug(self, fetch_allthethings_data): """The function should return a list with the specific debug buildername.""" fetch_allthethings_data.return_value = ALLTHETHINGS obtained = sorted( find_buildernames('try', 'mochitest-1', 'win32', 'debug')) expected = sorted([ u'Windows 7 VM 32-bit try debug test mochitest-1', u'Windows XP 32-bit try debug test mochitest-1', ]) assert obtained == expected
def test_without_test(self, fetch_allthethings_data): """The function should return a list with all tests for that platform.""" fetch_allthethings_data.return_value = ALLTHETHINGS # Only 4 is enough obtained = sorted(find_buildernames(repo='try', platform='macosx64'))[0:4] expected = sorted([ u'Rev4 MacOSX Snow Leopard 10.6 try opt test cppunit', u'Rev4 MacOSX Snow Leopard 10.6 try opt test crashtest', u'Rev4 MacOSX Snow Leopard 10.6 try opt test gtest', u'Rev4 MacOSX Snow Leopard 10.6 try opt test jittest' ]) assert obtained == expected
def test_without_platform(self, fetch_allthethings_data): """The function should return a list with all platforms for that test.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( sorted(find_buildernames( repo='mozilla-beta', suite_name='tp5o', job_type=None)), # 'Platform1 mozilla-beta talos tp5o' is not considered a valid # builder and we won't expect it ['Platform1 mozilla-beta pgo talos tp5o', 'Platform2 mozilla-beta talos tp5o'])
def test_full(self, fetch_allthethings_data): """The function should return a list with the specific buildername.""" fetch_allthethings_data.return_value = ALLTHETHINGS obtained = sorted( find_buildernames(repo='try', suite_name='mochitest-1', platform='win32', job_type='opt')) expected = sorted([ u'Windows 7 VM 32-bit try opt test mochitest-1', u'Windows XP 32-bit try opt test mochitest-1', ]) assert obtained == expected
def test_without_platform(self, fetch_allthethings_data): """The function should return a list with all platforms for that test.""" fetch_allthethings_data.return_value = ALLTHETHINGS obtained = sorted(find_buildernames( repo='mozilla-beta', suite_name='tp5o-e10s', job_type=None) ) expected = sorted(['Rev7 MacOSX Yosemite 10.10.5 mozilla-beta talos tp5o-e10s', 'Ubuntu HW 12.04 x64 mozilla-beta pgo talos tp5o-e10s', 'Windows 7 32-bit mozilla-beta pgo talos tp5o-e10s', 'Windows 8 64-bit mozilla-beta pgo talos tp5o-e10s', 'Windows XP 32-bit mozilla-beta pgo talos tp5o-e10s']) assert obtained == expected
def test_full(self, fetch_allthethings_data): """The function should return a list with the specific buildername.""" fetch_allthethings_data.return_value = ALLTHETHINGS obtained = sorted(find_buildernames( repo='try', suite_name='mochitest-1', platform='win32', job_type='opt') ) expected = sorted([ u'Windows 7 VM 32-bit try opt test mochitest-1', u'Windows XP 32-bit try opt test mochitest-1', ]) assert obtained == expected
def test_without_platform(self, fetch_allthethings_data): """The function should return a list with all platforms for that test.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( sorted( find_buildernames(repo='mozilla-beta', suite_name='tp5o', job_type=None)), # 'Platform1 mozilla-beta talos tp5o' is not considered a valid # builder and we won't expect it [ 'Platform1 mozilla-beta pgo talos tp5o', 'Platform2 mozilla-beta talos tp5o' ])
def test_without_platform(self, fetch_allthethings_data): """The function should return a list with all platforms for that test.""" fetch_allthethings_data.return_value = ALLTHETHINGS obtained = sorted( find_buildernames(repo='mozilla-beta', suite_name='tp5o-e10s', job_type=None)) expected = sorted([ 'Rev7 MacOSX Yosemite 10.10.5 mozilla-beta talos tp5o-e10s', 'Ubuntu HW 12.04 x64 mozilla-beta pgo talos tp5o-e10s', 'Windows 7 32-bit mozilla-beta pgo talos tp5o-e10s', 'Windows 8 64-bit mozilla-beta pgo talos tp5o-e10s', 'Windows XP 32-bit mozilla-beta pgo talos tp5o-e10s' ]) assert obtained == expected
def test_without_test(self, fetch_allthethings_data): """The function should return a list with all tests for that platform.""" fetch_allthethings_data.return_value = ALLTHETHINGS obtained = sorted(find_buildernames(repo='try', platform='android-x86')) expected = sorted([u'Android 4.2 x86 Emulator try opt test androidx86-set-4']) assert obtained == expected
def test_invalid(self): """The function should raise an error if both platform and test are None.""" with pytest.raises(AssertionError): find_buildernames('try', suite_name=None, platform=None)
def test_invalid(self): """The function should raise an error if both platform and test are None.""" with pytest.raises(AssertionError): find_buildernames('repo', suite_name=None, platform=None)
def test_without_test(self, fetch_allthethings_data): """The function should return a list with all tests for that platform.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( find_buildernames('mozilla-beta', platform='stage-platform2'), ['Platform2 mozilla-beta talos tp5o'])
def test_with_debug(self, fetch_allthethings_data): """The function should return a list with the specific debug buildername.""" fetch_allthethings_data.return_value = MOCK_ALLTHETHINGS self.assertEquals( find_buildernames('repo', 'mochitest-1', 'platform1', 'debug'), ['Platform1 repo debug test mochitest-1'])