Skip to content

Commit

Permalink
Assert for a bad uname that all attrs are empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
SethMichaelLarson authored and nir0s committed Jan 21, 2018
1 parent 22648cd commit 16fd311
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,15 @@ def test_unknowndistro_release(self):
'minor_version': '0'
}
self._test_outcome(desired_outcome)

def test_bad_uname(self):
self._setup_for_distro(os.path.join(TESTDISTROS, 'distro',
'baduname'))
self.distro = distro.LinuxDistribution()

assert self.distro.uname_attr('id') == ''
assert self.distro.uname_attr('name') == ''
assert self.distro.uname_attr('release') == ''


@pytest.mark.skipif(not IS_LINUX, reason='Irrelevant on non-linux')
Expand Down

0 comments on commit 16fd311

Please # to comment.