UT-CHG / BET

Python package for data-consistent stochastic inverse and forward problems.
http://ut-chg.github.io/BET
Other
11 stars 21 forks source link

Test_sample_set_1d #338

Closed mathematicalmichael closed 5 years ago

mathematicalmichael commented 5 years ago

This seems to be an orphan test method: test_sample.py Line 453

class Test_sample_set_1d(Test_sample_set):
    def setUp(self):
        self.dim = 1
        self.num = 100
        self.values = np.ones((self.num, self.dim))
        self.sam_set = sample.sample_set(dim=self.dim)
        self.sam_set.set_values(self.values)
        self.domain = np.array([[0, 1]], dtype=np.float)

What was the intent here? I can't find any reference to it. Is it just to make sure you can set a 1d space? If so, why use self.domain instead of self.sam_set.set_domain?

mathematicalmichael commented 5 years ago

is the idea that it's a subclass that simply overwrites the setUp method? nose knows to run all the same tests for it?

mathematicalmichael commented 5 years ago

confirmed. this is indeed what happens. very useful for writing my own tests.