Skip to content

Commit

Permalink
Improves readability of newly-added test case names
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel FORESTIER committed Oct 10, 2022
1 parent b165b92 commit e40187b
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ID=absolute_symlinks

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ID=root_dir_non_escape

This file was deleted.

20 changes: 10 additions & 10 deletions tests/test_distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,30 +731,30 @@ def test_empty_release(self) -> None:
desired_outcome = {"id": "empty"}
self._test_outcome(desired_outcome)

def test_absolutesymlinks(self) -> None:
def test_absolute_symlinks(self) -> None:
self.distro = distro.LinuxDistribution(
root_dir=os.path.join(TESTDISTROS, "distro", "absolutesymlinks")
root_dir=os.path.join(TESTDISTROS, "distro", "absolute_symlinks")
)
desired_outcome = {"id": "absolutesymlinks"}
desired_outcome = {"id": "absolute_symlinks"}
self._test_outcome(desired_outcome)

def test_rootdirescape(self) -> None:
def test_root_dir_escape(self) -> None:
self.distro = distro.LinuxDistribution(
root_dir=os.path.join(TESTDISTROS, "distro", "rootdirescape")
root_dir=os.path.join(TESTDISTROS, "distro", "root_dir_escape")
)
# loading existing file outside of root_dir has been prevented (empty data)
self._test_outcome({})

def test_rootdirnonescape(self) -> None:
def test_root_dir_non_escape(self) -> None:
self.distro = distro.LinuxDistribution(
root_dir=os.path.join(TESTDISTROS, "distro", "rootdirnonescape")
root_dir=os.path.join(TESTDISTROS, "distro", "root_dir_non_escape")
)
desired_outcome = {"id": "rootdirnonescape"}
desired_outcome = {"id": "root_dir_non_escape"}
self._test_outcome(desired_outcome)

def test_symlinksloop(self) -> None:
def test_symlinks_loop(self) -> None:
self.distro = distro.LinuxDistribution(
root_dir=os.path.join(TESTDISTROS, "distro", "symlinksloop")
root_dir=os.path.join(TESTDISTROS, "distro", "symlinks_loop")
)
# due to symbolic links loop, loading of file has been prevented (empty data)
self._test_outcome({})
Expand Down

0 comments on commit e40187b

Please sign in to comment.