def trace_coverage_support(self, sample_filename): try: import trace trace.find_executable_linenos(sample_filename) return True except NotImplementedError: return False
def test_deprecated_find_executable_linenos(self): with open(TESTFN, 'w') as fd: self.addCleanup(unlink, TESTFN) with self.assertWarns(DeprecationWarning): trace.find_executable_linenos(fd.name)
def test_deprecated_find_executable_linenos(self): with self.assertWarns(DeprecationWarning): with tempfile.NamedTemporaryFile() as fd: trace.find_executable_linenos(fd.name)