Skip to content

Commit c46d01b

Browse files
committed
fixed warning
1 parent 48bf840 commit c46d01b

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ before_script:
1414
- "export DISPLAY=:99.0"
1515
- "sh -e /etc/init.d/xvfb start"
1616
- sleep 3 # give xvfb some time to start
17+
- xauth generate :99.0 . trusted
1718

1819
# command to run tests
1920
script: nosetests --with-xunit --with-coverage --cover-html --cover-html-dir=Coverage_report --verbosity=3 test/testall.py

test/test_xlib_display.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@
1919
class TestXlibDisplay(unittest.TestCase):
2020
def setUp(self):
2121
# Create authority file.
22-
self.authfile = os.path.join(os.getenv("HOME"), ".Xauthority")
23-
self.cookie = "926e3f51b3540ca0d54bf2725c1af2b6"
2422
self.display_num = os.getenv("DISPLAY")
25-
os.system("xauth -f {0} add {1} MIT-MAGIC-COOKIE-1 {2}".format(self.authfile, self.display_num,
26-
self.cookie))
2723
self.display = Xlib.display.Display(self.display_num)
2824
self.dummy_str = "qqq"
2925
self.keysym = 65535
@@ -168,9 +164,6 @@ def test_get_selection_owner(self):
168164
atom = self.display.get_atom(self.display_num)
169165
self.assertEqual(self.display.get_selection_owner(atom), 0)
170166

171-
def tearDown(self):
172-
os.remove(self.authfile)
173-
174167

175168
if __name__ == '__main__':
176169
unittest.main()

0 commit comments

Comments
 (0)