Skip to content

Commit

Permalink
Fix EnvironmentTest
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Feb 29, 2016
1 parent 460672d commit fa3cbe9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tmuxp/testsuite/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ def test_socket_name(self):

def test_socket_path(self):
""" ``-S`` socket_path (alternative path for server socket). """

myserver = Server(socket_path='test')

self.assertEqual(myserver.socket_path, 'test')

def test_config(self):
""" ``-f`` file for tmux(1) configuration. """

myserver = Server(config_file='test')
self.assertEqual(myserver.config_file, 'test')

Expand All @@ -67,17 +65,16 @@ def test_88_colors(self):
self.assertIn('-8', proc.cmd)
self.assertNotIn('-2', proc.cmd)

class Environment(TmuxTestCase):

class EnvironmentTest(TmuxTestCase):

def test_show_environment(self):
"""Server.show_environment() returns dict."""

vars = self.server.show_environment()
self.assertIsInstance(vars, dict)

def test_set_show_environment_single(self):
"""Set environment then Server.show_environment(key)."""

self.server.set_environment('FOO', 'BAR')
self.assertEqual('BAR', self.server.show_environment('FOO'))

Expand All @@ -94,4 +91,5 @@ def test_show_environment_not_set(self):
def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(ServerTest))
suite.addTest(unittest.makeSuite(EnvironmentTest))
return suite

0 comments on commit fa3cbe9

Please sign in to comment.