Skip to content

Commit

Permalink
made paths more platform independent addressing issue #2
Browse files Browse the repository at this point in the history
  • Loading branch information
niknow committed Aug 7, 2016
1 parent a8ff054 commit 67ae12d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
5 changes: 3 additions & 2 deletions tarenalib/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ def _set_configfile_name(self, value):
if value:
self._configfile_name = value
else:
self._configfile_name = os.path.expanduser("~") \
+ "\\task_arena_config"
self._configfile_name = os.path.join(
os.path.expanduser("~"),
"task_arena_config")

configfile_name = property(_get_configfile_name, _set_configfile_name)

Expand Down
13 changes: 6 additions & 7 deletions tarenalib/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_arenas(self):

def test_add(self):
with self.runner.isolated_filesystem():
dloc = os.getcwd() + '/local'
dloc = os.path.join(os.getcwd(), 'local')
tw = TaskWarrior(dloc)
t = Task(tw)
description = 'do dishes'
Expand All @@ -92,7 +92,7 @@ def test_add(self):

def test_remove(self):
with self.runner.isolated_filesystem():
dloc = os.getcwd() + '/local'
dloc = os.path.join(os.getcwd(), 'local')
tw = TaskWarrior(dloc)
t = Task(tw)
description = 'do dishes'
Expand All @@ -107,7 +107,7 @@ def test_remove(self):

def test_local(self):
with self.runner.isolated_filesystem():
dloc = os.getcwd() + '/local'
dloc = os.path.join(os.getcwd(), 'local')
tw = TaskWarrior(dloc)
t = Task(tw)
description = 'do dishes'
Expand All @@ -123,7 +123,7 @@ def test_local(self):
def test_remote(self):
with self.runner.isolated_filesystem():
self.runner.invoke(cli, cmd_dummy_arena)
dloc = os.getcwd() + '/remote'
dloc = os.path.join(os.getcwd(), 'remote')
tw = TaskWarrior(dloc)
for uda in uda_config_list:
tw.config.update({uda[0]: uda[1]})
Expand All @@ -138,9 +138,8 @@ def test_remote(self):

def test_sync(self):
with self.runner.isolated_filesystem():
cwd = os.getcwd()
dloc = cwd + '/local'
dremote = cwd + '/remote'
dloc = os.path.join(os.getcwd(), 'local')
dremote = os.path.join(os.getcwd(), 'remote')
tw_local = TaskWarrior(dloc)
tw_remote = TaskWarrior(dremote)
t = Task(tw_local)
Expand Down
2 changes: 1 addition & 1 deletion tarenalib/tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_get_save_task_emperor(self):
runner = CliRunner()
sys.stdout = self.old_stdout
with runner.isolated_filesystem():
config_file_name = os.getcwd()+'/config_file'
config_file_name = os.path.join(os.getcwd(), 'config_file')
self.assertEqual(os.path.isfile(config_file_name), False)
iom = IOManager(False, 75, config_file_name)
iom.get_task_emperor()
Expand Down

0 comments on commit 67ae12d

Please sign in to comment.