CivicSpleen / ambry

A comprehensive data package manager
BSD 2-Clause "Simplified" License
4 stars 5 forks source link

Bundle tryes to run all previous ingested bundles tests while ingesting. #175

Open nmb10 opened 8 years ago

nmb10 commented 8 years ago

Consider such test case using basic and casters bundles:

from test.test_base import TestBase

class Test(TestBase):

    def test1_basic(self):
        b = self.import_single_bundle('ingest.example.com/basic')
        self.assertIsNotNone(b.import_tests())

    def test2_casters(self):
        b = self.import_single_bundle('build.example.com/casters')
        self.assertIsNone(b.import_tests())

The order of the tests is important here - first should be basic bundle import, second should be casters bundle import.

If we run both tests:

py.test test/regression/test_175_issue.py::Test --verbose --capture=no

we fail in the second.

But if we run second test only:

py.test test/regression/test_175_issue.py::Test::test2_casters --verbose --capture=no

then it passes.

Caster bundle does not have any tests:

$ ls test/bundle_tests/build.example.com/casters 
bundle.py  bundle.yaml  documentation.md  __init__.py  schema.csv  sources.csv
nmb10 commented 8 years ago

Check/fix

py.test test/functional/test_bundles.py::Test --verbose --capture=no

after fixing that.

ericbusboom commented 8 years ago

Now sure how this got closed ....

ericbusboom commented 8 years ago

Ah, I closed it because when I run the 175 regression test in PyCharm, it passes, without noting the expected failure decorator.