def test_comparison(self): acu = CodeUnit("aa/afile.py") acu2 = CodeUnit("aa/afile.py") zcu = CodeUnit("aa/zfile.py") bcu = CodeUnit("aa/bb/bfile.py") assert acu == acu2 and acu <= acu2 and acu >= acu2 assert acu < zcu and acu <= zcu and acu != zcu assert zcu > acu and zcu >= acu and zcu != acu assert acu < bcu and acu <= bcu and acu != bcu assert bcu > acu and bcu >= acu and bcu != acu
def setUp(self): coverage = coveralls(data_file=Arguments.data_file, config_file=Arguments.config_file) coverage.load() self.reporter = CoverallsReporter(coverage, coverage.config) self.reporter.find_code_units(None) self.reporter.code_units.append(CodeUnit('LICENSE', FileLocator()))
def _canonical_dir(self, morf): """Return the canonical directory of the module or file `morf`.""" return os.path.split(CodeUnit(morf, self.file_locator).filename)[0]
def _canonical_dir(self, morf): return os.path.split(CodeUnit(morf, self.file_locator).filename)[0]