def test_validate_w_reporting_differing_md5sums(self, mockStdout): validate(sTestLocation + 'rook_w_differing_md5sums', True) mockStdout.write.assert_has_calls([ mock.call(''), mock.call('\n'), mock.call('Missing Files'), mock.call('\n'), mock.call(''), mock.call('\n'), mock.call('Extra Files'), mock.call('\n'), mock.call(''), mock.call('\n'), mock.call('Changed Files'), mock.call('\n'), mock.call(' tests/subcommand/validate/rook_w_differing_md5sums/rtl/rook.vhd'), mock.call('\n') ])
def test_validate_w_reporting_on_extra_file(self, mockStdout): validate(sTestLocation + 'rook_w_extra_file', True) mockStdout.write.assert_has_calls([ mock.call(''), mock.call('\n'), mock.call('Missing Files'), mock.call('\n'), mock.call(''), mock.call('\n'), mock.call('Extra Files'), mock.call('\n'), mock.call(' tests/subcommand/validate/rook_w_extra_file/rtl/rook-arch.vhd'), mock.call('\n'), mock.call(''), mock.call('\n'), mock.call('Changed Files'), mock.call('\n') ])
def test_validate(self): self.assertRaises(SystemExit, validate, sTestLocation + 'bad_rook', False) self.assertEqual(validate(sTestLocation + 'rook', False), None)