Skip to content

Commit

Permalink
Fix pytest warning
Browse files Browse the repository at this point in the history
Classes prefixed with Test... automatically considered as test classes.
  • Loading branch information
vsbogd committed Mar 30, 2024
1 parent 3729f2e commit 591b58c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions python/tests/test_custom_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from hyperon import *
from test_common import HyperonTestCase

class TestSpace(AbstractSpace):
class CustomSpace(AbstractSpace):

def __init__(self, unwrap=True):
super().__init__()
Expand Down Expand Up @@ -66,7 +66,7 @@ class CustomSpaceTest(HyperonTestCase):

def test_custom_space(self):

test_space = TestSpace()
test_space = CustomSpace()
test_space.test_attrib = "Test Space Payload Attrib"

kb = SpaceRef(test_space)
Expand All @@ -78,7 +78,7 @@ def test_custom_space(self):
self.assertEqualNoOrder(kb.get_atoms(), [S("a"), S("b")])

def test_remove(self):
kb = SpaceRef(TestSpace())
kb = SpaceRef(CustomSpace())
kb.add_atom(S("a"))
kb.add_atom(S("b"))
kb.add_atom(S("c"))
Expand All @@ -88,7 +88,7 @@ def test_remove(self):
self.assertEqualNoOrder(kb.get_atoms(), [S("a"), S("c")])

def test_replace(self):
kb = SpaceRef(TestSpace())
kb = SpaceRef(CustomSpace())
kb.add_atom(S("a"))
kb.add_atom(S("b"))
kb.add_atom(S("c"))
Expand All @@ -97,7 +97,7 @@ def test_replace(self):
self.assertEqualNoOrder(kb.get_atoms(), [S("a"), S("d"), S("c")])

def test_query(self):
kb = SpaceRef(TestSpace())
kb = SpaceRef(CustomSpace())
kb.add_atom(E(S("A"), S("B")))
kb.add_atom(E(S("C"), S("D")))
# Checking that multiple matches can be returned
Expand All @@ -110,7 +110,7 @@ def test_atom_containing_space(self):
m = MeTTa(env_builder=Environment.test_env())

# Make a little space and add it to the MeTTa interpreter's space
little_space = SpaceRef(TestSpace())
little_space = SpaceRef(CustomSpace())
little_space.add_atom(E(S("A"), S("B")))
space_atom = G(little_space)
m.space().add_atom(E(S("little-space"), space_atom))
Expand All @@ -127,7 +127,7 @@ def test_atom_containing_space(self):
little_space.add_atom(E(S("big-space"), G(m.space())))

def test_match_nested_custom_space(self):
nested = SpaceRef(TestSpace())
nested = SpaceRef(CustomSpace())
nested.add_atom(E(S("A"), S("B")))
space_atom = G(nested)

Expand All @@ -139,7 +139,7 @@ def test_match_nested_custom_space(self):

def test_runner_with_custom_space(self):

test_space = TestSpace()
test_space = CustomSpace()
test_space.test_attrib = "Test Space Payload Attrib"

space = SpaceRef(test_space)
Expand Down

0 comments on commit 591b58c

Please sign in to comment.