Skip to content

Unified test suite #8

Open
Open

Description

@mrocklin

After we figure out CI testing in #2 we might consider refactoring the test suite into a unified TestCase class for common functionality.

Activity

  1. jakirkham commented on Mar 2, 2018

    @jakirkham
    Member

    So are you wanting to use unittest or are you only thinking the organization structure of a class would be nice?

  2. mrocklin commented on Mar 2, 2018

    @mrocklin
    MemberAuthor

    No strong preference. What do you think is best? I would probably default to unittest just because that's what I've done before. That's not a very good reason on it's own though :)

  3. jakirkham commented on Mar 2, 2018

    @jakirkham
    Member

    Sure, using unittest is fine. Thought about pytest too. Though don't have any better arguments for it. :)

  4. mrocklin commented on Mar 2, 2018

    @mrocklin
    MemberAuthor
  5. guillaumeeb commented on Jul 31, 2018

    @guillaumeeb
    Member

    Do we need to do something here? Or is the current configuration good enough? I admit I don't quite understand what is being suggested by @mrocklin at first.

  6. mrocklin commented on Jul 31, 2018

    @mrocklin
    MemberAuthor

    My original suggestion was to create a unittest.TestCase subclass that contains a set of tests, but that needs a bit of specialization to each cluster type.

    class TestBasic(unittest.TestCase):
        Cluster = None
        def test_cores(self):
            with self.Cluster(cores=4, processes=2) as cluster:
                cluster.scale(2)
                ... wait a bit ...
                with Client(cluster) as client:
                    info = client.scheduler_info()
                    assert len(info['workers']) == 4
                    ... more assertions
        
        def test_header(self):
            ...
    
        def test_foo(self):
            ...
    
    class TestPBSCluster(TestBasic):
        Cluster = PBSCluster
  7. mrocklin commented on Jul 31, 2018

    @mrocklin
    MemberAuthor

    I'm not sure how much reuse there is though. This might or might not make sense.

  8. added
    CI
    on Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions