From 40861410b69b408242dc5b76aca37033a1e4b8e4 Mon Sep 17 00:00:00 2001 From: "Luis C. Berrocal" Date: Fri, 25 Sep 2015 07:12:36 -0500 Subject: [PATCH 1/2] Added additional tests --- tests/test_javaproperties.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_javaproperties.py b/tests/test_javaproperties.py index ec3ac66..d6897a3 100644 --- a/tests/test_javaproperties.py +++ b/tests/test_javaproperties.py @@ -24,11 +24,19 @@ def test_variable(self): def test_variable_dollar(self): self.assertEqual('Value01/path/to/myapp', self.java_properties['Key24']) + def test_key_with_spaces_eq(self): + #Key17\ With\ Spaces=Value17 + self.assertEqual('Value17', self.java_properties['Key17 With Spaces']) + + def test_key_with_spaces(self): + #Key16\ With\ Spaces:Value16 + self.assertEqual('Value16', self.java_properties['Key16 With Spaces']) + def test_load(self): filename = os.path.join(TEST_DATA_FOLDER, 'simple.properties') simple_java_properties = JavaProperties() simple_java_properties.load(open(filename)) - print(simple_java_properties) + self.assertEqual('1.5, 1.6.1, 1.7, 1.8,', simple_java_properties['supported.java.versions']) if __name__ == '__main__': From 3008cc4d7e599f8b46b5d28441e22204a3c79927 Mon Sep 17 00:00:00 2001 From: "Luis C. Berrocal" Date: Fri, 25 Sep 2015 07:17:10 -0500 Subject: [PATCH 2/2] Updated readme to include travis badge --- README.rst | 3 +++ setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 6b1a0de..662d145 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,9 @@ pyjavaprops ------------- +.. image:: https://travis-ci.org/luiscberrocal/pyjavaprops.svg?branch=master + :target: https://travis-ci.org/luiscberrocal/pyjavaprops + Library to read Java style properties files. I don't particularly like properties files but working with them in Java is very easy. I recently had to support reading properties files using Python. diff --git a/setup.py b/setup.py index 6a3d274..f58105b 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ with open("README.rst") as src: readme = src.read() -version = '0.1.3' +version = '0.1.4' setup( name='pyjavaprops',