Skip to content

Commit 67d229b

Browse files
author
Pipeline
committed
WIP updating to python 2 to python 3
1 parent 39965f1 commit 67d229b

File tree

7 files changed

+41
-23
lines changed

7 files changed

+41
-23
lines changed

.vscode/settings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.background": "#263205",
4+
"titleBar.activeBackground": "#354507",
5+
"titleBar.activeForeground": "#F6FCE5"
6+
},
7+
"python.testing.unittestArgs": [
8+
"-v",
9+
"-s",
10+
"./tests",
11+
"-p",
12+
"*test*.py"
13+
],
14+
"python.testing.pytestEnabled": false,
15+
"python.testing.unittestEnabled": true
16+
}

Frames/MobTimerController.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import uuid
44
from tkinter import *
5+
import sys
56

67
from Frames.MinimalScreenBlockerFrame import MinimalScreenBlockerFrame
78
from Frames.OuterFrame import OuterFrame

Infrastructure/TipsManager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77

88
class TipsManager(object):
9-
def __init__(self, seed = None, root_directory=sys.argv[0]):
10-
self.root_directory = root_directory
9+
def __init__(self, seed=None, root_directory=sys.argv[0]):
10+
self.root_directory = "/".join(root_directory.split('/')[:-1])
1111
if seed is not None:
1212
random.seed(seed)
1313

1414
def get_random_tip(self):
15-
tips_folder = self.root_directory+ "/Tips"
15+
tips_folder = self.root_directory + "/Tips"
1616
random_file = random.choice(os.listdir("%s" % tips_folder))
1717
random_file_path = tips_folder + "\\" + random_file
1818
return "{}: {}" .format(random_file, TipsManager.random_line(random_file_path))

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ To add a theme simply copy and existing theme. To use that theme, put the file n
2929
## Project Links
3030
[Trello Kanban Board]( https://trello.com/b/THISIB9Q/mob-programming-timer-python)
3131

32+
# Todo
33+
* Update to latest version of python
34+
* Convert to single file distributable
35+
* Create plugin infrastructure

requirements.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
approvaltests==0.1.12
2-
py2exe==0.9.2.2
3-
pysmb==1.1.18
4-
paho-mqtt==1.2
5-
pyreadline==2.1
6-
screeninfo==0.2.1
7-
pypiwin32==219
8-
dnspython==1.14.0
9-
Pillow==3.3.1
10-
Pillow-PIL==0.1.dev0
11-
pyasn1==0.1.9
12-
cffi==1.7.0
13-
pycparser==2.14
14-
pysha3==0.3
1+
approvaltests
2+
py2exe
3+
pysmb
4+
paho-mqtt
5+
pyreadline
6+
screeninfo
7+
pypiwin32
8+
dnspython
9+
Pillow
10+
Pillow-PIL
11+
pyasn1
12+
cffi
13+
pycparser
14+
pysha3

tests/Infrastructure/CountdownManager/TestsCountdownManager.py renamed to tests/Infrastructure/CountdownManager/test_CountdownManager.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
import time
33
import unittest
44

5-
from approvaltests import Approvals
6-
from approvaltests.GenericDiffReporterFactory import GenericDiffReporterFactory
5+
from approvaltests.approvals import verify
76

87
from Infrastructure.CountdownManager import CountdownManager
98

109

11-
class TestsCountdownManager(unittest.TestCase):
12-
def setUp(self):
13-
self.reporter = GenericDiffReporterFactory().get_first_working()
10+
class test_CountdownManager(unittest.TestCase):
1411

1512
def test_set_countdown_timer(self):
1613
countdown_manager = CountdownManager(None)
@@ -39,7 +36,7 @@ def time_change_callback(days, minutes, seconds):
3936
countdown_manager.set_countdown_duration(853, 32)
4037
countdown_manager.set_countdown_duration(3, 62)
4138

42-
Approvals.verify(result["result"], self.reporter)
39+
verify(result["result"])
4340

4441

4542
if __name__ == '__main__':

Infrastructure/Sessions/00010203-0405-0607-0809-0a0b0c0d0e0f renamed to tests/Infrastructure/CountdownManager/test_CountdownManager.test_subscribe_to_time_changes.approved.txt

File renamed without changes.

0 commit comments

Comments
 (0)