From ae9bd823edbf936b652825c251343a6845b9ae38 Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Mon, 7 Sep 2015 22:04:02 -0700 Subject: [PATCH] mathics: Fix unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disabled two tests that require a preinstalled build of Mathics to work, which is incompatible with the way nix runs them. [Bjørn: remove unrelated disabling on Python 3] --- .../mathics/disable_console_tests.patch | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/development/python-modules/mathics/disable_console_tests.patch diff --git a/pkgs/development/python-modules/mathics/disable_console_tests.patch b/pkgs/development/python-modules/mathics/disable_console_tests.patch new file mode 100644 index 000000000000..6e20686fc41a --- /dev/null +++ b/pkgs/development/python-modules/mathics/disable_console_tests.patch @@ -0,0 +1,21 @@ +These tests require that Mathics already be installed to work, +which is not true when nix runs them. + +--- a/test/test_console.py 2015-09-07 21:41:08.530501979 -0700 ++++ b/test/test_console.py 2015-09-07 21:42:44.082176084 -0700 +@@ -13,6 +13,7 @@ + os.environ["TERM"] = "dumb" + self.console = pexpect.spawn('python2 mathics/main.py --color NOCOLOR') + ++ @unittest.expectedFailure + def testLaunch(self): + cons = self.console + +@@ -41,6 +42,7 @@ + 'Quit by pressing CONTROL-D\r\n' + '\r\n') + ++ @unittest.expectedFailure + def testPrompt(self): + cons = self.console + cons.expect('Quit by pressing CONTROL-D\r\n\r\n') diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4ca2faec8ef1..6b5841d1f539 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7912,6 +7912,8 @@ let sha256 = "1hyrxnhxw35vn00k55hp9bkg8vg4dsphrpfg1yg4cn53y78rk1im"; }; + patches = [ ../development/python-modules/mathics/disable_console_tests.patch ]; + buildInputs = with self; [ pexpect ]; propagatedBuildInputs = with self; [