Skip to content

Commit

Permalink
tests: remove pyfakefs as unit test dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Jason C. Nucciarone <[email protected]>
  • Loading branch information
NucciTheBoss committed Jul 10, 2024
1 parent 0ee8efb commit 1aabe0a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions tests/unit/test_slurm_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

import base64
import subprocess
from unittest import TestCase
from unittest.mock import patch

import charms.hpc_libs.v0.slurm_ops as slurm
from charms.hpc_libs.v0.slurm_ops import ServiceType, SlurmManagerBase
from pyfakefs.fake_filesystem_unittest import TestCase

MUNGEKEY = b"1234567890"
MUNGEKEY_BASE64 = base64.b64encode(MUNGEKEY)
Expand Down Expand Up @@ -41,9 +41,6 @@
@patch("charms.hpc_libs.v0.slurm_ops.subprocess.check_output")
class TestSlurmOps(TestCase):

def setUp(self) -> None:
self.setUpPyfakefs()

def test_format_key(self, _) -> None:
"""Test that `kebabize` properly formats slurm keys."""
self.assertEqual(slurm.format_key("CPUs"), "cpus")
Expand Down Expand Up @@ -75,9 +72,6 @@ def test_call_error(self, subcmd) -> None:
class SlurmOpsBase:
"""Test the Slurm service operations managers."""

def setUp(self) -> None:
self.setUpPyfakefs()

def test_config_name(self, *_) -> None:
"""Test that the config name is correctly set."""
self.assertEqual(self.manager._service.config_name, self.config_name)
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ commands =
description = Run unit tests
deps =
pytest
pyfakefs
coverage[toml]
-r {tox_root}/requirements.txt
commands =
Expand Down

0 comments on commit 1aabe0a

Please sign in to comment.