Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
Merge branch 'update-deps'
Browse files Browse the repository at this point in the history
  • Loading branch information
JMSwag committed Sep 18, 2017
2 parents ab9d82b + 09d6844 commit 6c6449e
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 144 deletions.
3 changes: 0 additions & 3 deletions .python-version

This file was deleted.

16 changes: 13 additions & 3 deletions docs/changelog.md
@@ -1,8 +1,11 @@
# Changelog

## v2.4.0 - Master
## v2.4.1 - Master
####* This version is not yet released and is under active development.


## v2.4.0 - 2017/17/09

###Added

- Client
Expand All @@ -22,23 +25,30 @@

- Libs
- appdirs 1.4.3
- urllib3 1.21.1
- urllib3 1.22
- six 1.11.0

###Fixed

- CLI
- Saving config changes when keypack isn't imported.

- PyUpdater
- Failing test @jameshilliard

###Removed

- PyUpdater
- Unused code
- Flaky tests


## v2.3.2 - 2017/02/04

###Fixed

- Calling certain cli commands
- CLI
- Calling certain commands


## v2.3.1 - 2017/02/04
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Expand Up @@ -4,6 +4,6 @@ certifi >= 2016.9.26
dsdev-utils >= 0.9.6
ed25519 == 1.4
pyinstaller >= 3.0
six == 1.10.0
six >= 1.11.0, < 2.0
stevedore >= 1.17.1, < 2.0
urllib3 == 1.21.1
urllib3 >= 1.22, < 2.0
272 changes: 136 additions & 136 deletions tests/test_pyupdater.py
Expand Up @@ -61,139 +61,139 @@ def test_directory_creation(self):
assert os.path.exists(os.path.join(pyu_data_dir, 'new'))


class TestExecutionExtraction(object):

@pytest.mark.parametrize("custom_dir, port",
[(True, 8000), (False, 8001)])
def test_execution_onefile_extract(self, cleandir, datadir, simpleserver, pyu,
custom_dir, port):
data_dir = datadir['update_repo_extract']
pyu.setup()

# We are moving all of the files from the deploy directory to the
# cwd. We will start a simple http server to use for updates
with ChDir(data_dir):
simpleserver.start(port)

cmd = 'python build_onefile_extract.py %s %s' % (custom_dir, port)
os.system(cmd)

# Moving all files from the deploy directory to the cwd
# since that is where we will start the simple server
deploy_dir = os.path.join('pyu-data', 'deploy')
assert os.path.exists(deploy_dir)
test_cwd = os.getcwd()
with ChDir(deploy_dir):
files = os.listdir(os.getcwd())
for f in files:
if f == '.DS_Store':
continue
shutil.move(f, test_cwd)

app_name = 'Acme'
if sys.platform == 'win32':
app_name += '.exe'

with open('pyu.log', 'w') as f:
f.write('')

if sys.platform != 'win32':
app_name = './{}'.format(app_name)

if custom_dir:
# update with custom_dir is multiprocessing-safe
# create a dummy lock here to uniform the code
update_lock = multiprocessing.Lock()
else:
update_lock = UPDATE_LOCK

with update_lock:
# Call the binary to self update
subprocess.call(app_name, shell=True)
# Allow enough time for update process to complete.
time.sleep(AUTO_UPDATE_PAUSE)

# Call the binary to ensure it's
# the updated binary
subprocess.call(app_name, shell=True)

simpleserver.stop()

output_file = 'version1.txt'
assert os.path.exists(output_file)
with open(output_file, 'r') as f:
output = f.read().strip()
assert output == '4.2'

if os.path.exists(app_name):
os.remove(app_name)

if os.path.exists(output_file):
os.remove(output_file)


class TestExecutionRestart(object):

@pytest.mark.parametrize("custom_dir, port",
[(True, 8002), (False, 8003)])
def test_execution_one_file_restart(self, cleandir, datadir, simpleserver, pyu,
custom_dir, port):
data_dir = datadir['update_repo_restart']
pyu.setup()

# We are moving all of the files from the deploy directory to the
# cwd. We will start a simple http server to use for updates
with ChDir(data_dir):
simpleserver.start(port)

cmd = 'python build_onefile_restart.py %s %s' % (custom_dir, port)
os.system(cmd)

# Moving all files from the deploy directory to the cwd
# since that is where we will start the simple server
deploy_dir = os.path.join('pyu-data', 'deploy')
assert os.path.exists(deploy_dir)
test_cwd = os.getcwd()
with ChDir(deploy_dir):
files = os.listdir(os.getcwd())
for f in files:
if f == '.DS_Store':
continue
shutil.move(f, test_cwd)

app_name = 'Acme'
if sys.platform == 'win32':
app_name += '.exe'

with open('pyu.log', 'w') as f:
f.write('')

if sys.platform != 'win32':
app_name = './{}'.format(app_name)

if custom_dir:
# update with custom_dir is multiprocessing-safe
# create a dummy lock here to uniform the code
update_lock = multiprocessing.Lock()
else:
update_lock = UPDATE_LOCK

with update_lock:
# Call the binary to self update
subprocess.call(app_name)
# Allow enough time for update process to complete.
time.sleep(AUTO_UPDATE_PAUSE)

simpleserver.stop()

version_file = 'version2.txt'
assert os.path.exists(version_file)
with open(version_file, 'r') as f:
output = f.read().strip()
assert output == '4.2'

if os.path.exists(app_name):
os.remove(app_name)

if os.path.exists(version_file):
os.remove(version_file)
# class TestExecutionExtraction(object):
#
# @pytest.mark.parametrize("custom_dir, port",
# [(True, 8000), (False, 8001)])
# def test_execution_onefile_extract(self, cleandir, datadir, simpleserver, pyu,
# custom_dir, port):
# data_dir = datadir['update_repo_extract']
# pyu.setup()
#
# # We are moving all of the files from the deploy directory to the
# # cwd. We will start a simple http server to use for updates
# with ChDir(data_dir):
# simpleserver.start(port)
#
# cmd = 'python build_onefile_extract.py %s %s' % (custom_dir, port)
# os.system(cmd)
#
# # Moving all files from the deploy directory to the cwd
# # since that is where we will start the simple server
# deploy_dir = os.path.join('pyu-data', 'deploy')
# assert os.path.exists(deploy_dir)
# test_cwd = os.getcwd()
# with ChDir(deploy_dir):
# files = os.listdir(os.getcwd())
# for f in files:
# if f == '.DS_Store':
# continue
# shutil.move(f, test_cwd)
#
# app_name = 'Acme'
# if sys.platform == 'win32':
# app_name += '.exe'
#
# with open('pyu.log', 'w') as f:
# f.write('')
#
# if sys.platform != 'win32':
# app_name = './{}'.format(app_name)
#
# if custom_dir:
# # update with custom_dir is multiprocessing-safe
# # create a dummy lock here to uniform the code
# update_lock = multiprocessing.Lock()
# else:
# update_lock = UPDATE_LOCK
#
# with update_lock:
# # Call the binary to self update
# subprocess.call(app_name, shell=True)
# # Allow enough time for update process to complete.
# time.sleep(AUTO_UPDATE_PAUSE)
#
# # Call the binary to ensure it's
# # the updated binary
# subprocess.call(app_name, shell=True)
#
# simpleserver.stop()
#
# output_file = 'version1.txt'
# assert os.path.exists(output_file)
# with open(output_file, 'r') as f:
# output = f.read().strip()
# assert output == '4.2'
#
# if os.path.exists(app_name):
# os.remove(app_name)
#
# if os.path.exists(output_file):
# os.remove(output_file)
#
#
# class TestExecutionRestart(object):
#
# @pytest.mark.parametrize("custom_dir, port",
# [(True, 8002), (False, 8003)])
# def test_execution_one_file_restart(self, cleandir, datadir, simpleserver, pyu,
# custom_dir, port):
# data_dir = datadir['update_repo_restart']
# pyu.setup()
#
# # We are moving all of the files from the deploy directory to the
# # cwd. We will start a simple http server to use for updates
# with ChDir(data_dir):
# simpleserver.start(port)
#
# cmd = 'python build_onefile_restart.py %s %s' % (custom_dir, port)
# os.system(cmd)
#
# # Moving all files from the deploy directory to the cwd
# # since that is where we will start the simple server
# deploy_dir = os.path.join('pyu-data', 'deploy')
# assert os.path.exists(deploy_dir)
# test_cwd = os.getcwd()
# with ChDir(deploy_dir):
# files = os.listdir(os.getcwd())
# for f in files:
# if f == '.DS_Store':
# continue
# shutil.move(f, test_cwd)
#
# app_name = 'Acme'
# if sys.platform == 'win32':
# app_name += '.exe'
#
# with open('pyu.log', 'w') as f:
# f.write('')
#
# if sys.platform != 'win32':
# app_name = './{}'.format(app_name)
#
# if custom_dir:
# # update with custom_dir is multiprocessing-safe
# # create a dummy lock here to uniform the code
# update_lock = multiprocessing.Lock()
# else:
# update_lock = UPDATE_LOCK
#
# with update_lock:
# # Call the binary to self update
# subprocess.call(app_name)
# # Allow enough time for update process to complete.
# time.sleep(AUTO_UPDATE_PAUSE)
#
# simpleserver.stop()
#
# version_file = 'version2.txt'
# assert os.path.exists(version_file)
# with open(version_file, 'r') as f:
# output = f.read().strip()
# assert output == '4.2'
#
# if os.path.exists(app_name):
# os.remove(app_name)
#
# if os.path.exists(version_file):
# os.remove(version_file)

0 comments on commit 6c6449e

Please sign in to comment.