##// END OF EJS Templates
Correctly tearDown some test cases with multiple inheritance....
Matthias Bussonnier -
Show More
@@ -546,6 +546,10 b' class ExitCodeChecks(tt.TempFileMixin):'
546 546 else:
547 547 del os.environ['SHELL']
548 548
549 def tearDown(self):
550 tt.TempFileMixin.tearDown(self)
551
552
549 553 class TestSystemRaw(unittest.TestCase, ExitCodeChecks):
550 554 system = ip.system_raw
551 555
@@ -566,10 +570,16 b' class TestSystemRaw(unittest.TestCase, ExitCodeChecks):'
566 570 "keyboard interrupt from subprocess.call")
567 571 self.assertEqual(ip.user_ns['_exit_code'], -signal.SIGINT)
568 572
573 def tearDown(self):
574 ExitCodeChecks.tearDown(self)
575
569 576 # TODO: Exit codes are currently ignored on Windows.
570 577 class TestSystemPipedExitCode(unittest.TestCase, ExitCodeChecks):
571 578 system = ip.system_piped
572 579
580 def tearDown(self):
581 ExitCodeChecks.tearDown(self)
582
573 583 @skip_win32
574 584 def test_exit_code_ok(self):
575 585 ExitCodeChecks.test_exit_code_ok(self)
@@ -594,6 +604,9 b' class TestModules(unittest.TestCase, tt.TempFileMixin):'
594 604 out = "False\nFalse\nFalse\n"
595 605 tt.ipexec_validate(self.fname, out)
596 606
607 def tearDown(self):
608 tt.TempFileMixin.tearDown(self)
609
597 610 class Negator(ast.NodeTransformer):
598 611 """Negates all number literals in an AST."""
599 612 def visit_Num(self, node):
@@ -27,6 +27,9 b" SQLITE_NOT_AVAILABLE_ERROR = ('WARNING: IPython History requires SQLite,'"
27 27 class TestFileToRun(unittest.TestCase, tt.TempFileMixin):
28 28 """Test the behavior of the file_to_run parameter."""
29 29
30 def tearDown(self):
31 tt.TempFileMixin.tearDown(self)
32
30 33 def test_py_script_file_attribute(self):
31 34 """Test that `__file__` is set when running `ipython file.py`"""
32 35 src = "print(__file__)\n"
General Comments 0
You need to be logged in to leave comments. Login now